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