Skip to content

Commit

Permalink
Remove timout in async_test for websockets tests
Browse files Browse the repository at this point in the history
Remove all the timeout in async_test for websockets tests.
Affected tests: 21
Before: Pass: 6, Failed: 15
After: Pass: 6, Failed: 15
Related: #11120
  • Loading branch information
qiuzhong committed Nov 20, 2018
1 parent 3e5c53c commit b37b12d
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion websockets/binary/002.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
t.done();
});

}, null, {timeout:20000});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/binary/004.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
t.done();
})

}, null, {timeout:20000});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/constructor/013.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
}, ws[i]);
ws[i].onerror = t.step_func(function() {assert_unreached()});
}
}, null, {timeout:25000});
}, null);
</script>

2 changes: 1 addition & 1 deletion websockets/cookies/003.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
});
document.body.appendChild(iframe);
}, null, {timeout:9900});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/cookies/004.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
});
ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
document.body.appendChild(iframe);
}, null, {timeout:9900})
}, null)
</script>
2 changes: 1 addition & 1 deletion websockets/cookies/007.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
if (new RegExp('ws_test_'+cookie_id+'=test').test(document.cookie)) {
assert_unreached('cookie was set during script execution');
}
}, null, {timeout:12000});
}, null);
</script>
8 changes: 4 additions & 4 deletions websockets/extended-payload-length.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
assert_equals(e.data, data);
t.done();
});
}, "Application data is 125 byte which means any 'Extended payload length' field isn't used at all.", {timeout:20000});
}, "Application data is 125 byte which means any 'Extended payload length' field isn't used at all.");

async_test(function(t){
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
Expand All @@ -34,7 +34,7 @@
assert_equals(e.data, data);
t.done();
});
}, "Application data is 126 byte which starts to use the 16 bit 'Extended payload length' field.", {timeout:20000});
}, "Application data is 126 byte which starts to use the 16 bit 'Extended payload length' field.");

async_test(function(t){
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
Expand All @@ -48,7 +48,7 @@
assert_equals(e.data, data);
t.done();
});
}, "Application data is 0xFFFF byte which means the upper bound of the 16 bit 'Extended payload length' field.", {timeout:20000});
}, "Application data is 0xFFFF byte which means the upper bound of the 16 bit 'Extended payload length' field.");

async_test(function(t){
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
Expand All @@ -62,6 +62,6 @@
assert_equals(e.data, data);
t.done();
});
}, "Application data is (0xFFFF + 1) byte which starts to use the 64 bit 'Extended payload length' field", {timeout:20000});
}, "Application data is (0xFFFF + 1) byte which starts to use the 64 bit 'Extended payload length' field");

</script>
2 changes: 1 addition & 1 deletion websockets/interfaces/CloseEvent/clean-close.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
assert_equals(e.wasClean,true);
t.done();
});
}, null, {timeout:2000});
}, null);
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
assert_equals(e.data, data);
t.done();
})
}, null, {timeout:20000});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/interfaces/WebSocket/close/close-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
});
ws.close();
assert_equals(ws.readyState, ws.CLOSING);
}, undefined, {timeout:9900});
}, undefined);
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
});
}, 1000);
ws.onopen = ws.onclose = t.unreached_func();
}, undefined, {timeout:12000});
}, undefined);
</script>
2 changes: 1 addition & 1 deletion websockets/interfaces/WebSocket/close/close-nested.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
});
ws.close();
assert_equals(ws.readyState, ws.CLOSING);
}, undefined, {timeout:9900});
}, undefined);
</script>
2 changes: 1 addition & 1 deletion websockets/interfaces/WebSocket/events/003.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
var ev = document.createEvent('UIEvents');
ev.initUIEvent('open', false, false, window, 5);
ws.dispatchEvent(ev);
}, null, {timeout:2000});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/interfaces/WebSocket/events/007.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
var ev = document.createEvent('UIEvents');
ev.initUIEvent('message', false, false, window, 5);
ws.dispatchEvent(ev);
}, null, {timeout:2000});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/interfaces/WebSocket/events/009.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
var ev = document.createEvent('UIEvents');
ev.initUIEvent('close', false, false, window, 5);
ws.dispatchEvent(ev);
}, null, {timeout:2000});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/keeping-connection-open/001.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
});
}, 20000);
})
}, null, {timeout:30000});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/opening-handshake/001.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
t.step_timeout(() => t.done(), 50);
});
ws.onmessage = ws.onopen = t.unreached_func();
}, null, {timeout:9900});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/opening-handshake/002.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
ws.close();
});
ws.onerror = ws.onmessage = ws.onclose = t.unreached_func();
}, null, {timeout:9900});
}, null);
</script>
2 changes: 1 addition & 1 deletion websockets/unload-a-document/002.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p>Test requires popup blocker disabled</p>
<div id=log></div>
<script>
var t = async_test(null, {timeout:15000});
var t = async_test(null);
var w;
var uuid;
t.step(function() {
Expand Down
2 changes: 1 addition & 1 deletion websockets/unload-a-document/004.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div id=log></div>
<script>
var uuid;
var t = async_test(null, {timeout:15000})
var t = async_test(null)
t.step(function() {uuid = token()});
var navigate = t.step_func(function() {
document.getElementsByTagName("iframe")[0].src = 'data:text/html,<body onload="history.back()">';
Expand Down
2 changes: 1 addition & 1 deletion websockets/unload-a-document/005.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p>Test requires popup blocker disabled</p>
<div id=log></div>
<script>
var t = async_test(null, {timeout:15000});
var t = async_test(null);
t.step(function() {
var w = window.open("005-1.html");
add_result_callback(function() {
Expand Down

0 comments on commit b37b12d

Please sign in to comment.