浏览代码

Change XMLHttpRequest test cases

Ben Hsieh 8 年前
父节点
当前提交
bb126fdb18
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2
    3
      test/test-xmlhttp.js

+ 2
- 3
test/test-xmlhttp.js 查看文件

@@ -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}/>)