Browse Source

Change XMLHttpRequest test cases

Ben Hsieh 8 years ago
parent
commit
bb126fdb18
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      test/test-xmlhttp.js

+ 2
- 3
test/test-xmlhttp.js View File

@@ -156,7 +156,7 @@ describe('request headers records should be cleared by open()', (report, done) =
156 156
     if(this.readyState == 4) {
157 157
       report(<Assert key="headers should be cleared by open()"
158 158
         expect={'200'}
159
-        actual={this.response['value']}/>)
159
+        actual={this.response.value}/>)
160 160
       done()
161 161
     }
162 162
   }
@@ -239,11 +239,10 @@ describe('upload progress event test', (report, done) => {
239 239
   }
240 240
   xhr.onreadystatechange = function() {
241 241
     if(this.readyState == XMLHttpRequest.DONE) {
242
-      console.log(xhr)
243 242
       report(
244 243
         <Assert key="reponse should correct"
245 244
           expect={time}
246
-          actual={parseInt(xhr.response.time)}/>,
245
+          actual={Math.floor(xhr.response.time)}/>,
247 246
         <Assert key="responseType should correct"
248 247
           expect={'json'}
249 248
           actual={xhr.responseType}/>)