       url: '/foo'
     ).progress (prog) ->
       prog.upload.should.equal false
-      prog.should.equal 'download progress!'
+      prog.msg.should.equal 'download progress!'
       done()
 
     scenario
       inFlight: ->
-        xhr.onprogress('download progress!')
+        xhr.onprogress
+          msg: 'download progress!'
     return
 
   describe 'params', ->

    @abort = sinon.spy()
    @setRequestHeader = sinon.spy()
    @getAllResponseHeaders = sinon.spy -> @headers
    throw new Error 'xhr not null' if xhr isnt null
    xhr = this


        xhr.withCredentials.should.be.true

  it 'should send progress notifications during upload', (done) ->
    Q.xhr(
      url: '/foo'
    ).progress (prog) ->
      prog.upload.should.equal true
      prog.msg.should.equal 'upload progress!'
      done()

    scenario
      inFlight: ->
        xhr.upload.onprogress
          msg: 'upload progress!'
    return


