From b37b12ddcb54f285cdf512e7fbab3d500067f6c0 Mon Sep 17 00:00:00 2001 From: qiuzhong Date: Fri, 16 Nov 2018 13:54:16 +0800 Subject: [PATCH 1/2] Remove timout in async_test for websockets tests 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 --- websockets/binary/002.html | 2 +- websockets/binary/004.html | 2 +- websockets/constructor/013.html | 2 +- websockets/cookies/003.html | 2 +- websockets/cookies/004.html | 2 +- websockets/cookies/007.html | 2 +- websockets/extended-payload-length.html | 8 ++++---- websockets/interfaces/CloseEvent/clean-close.html | 2 +- .../WebSocket/bufferedAmount/bufferedAmount-large.html | 2 +- websockets/interfaces/WebSocket/close/close-basic.html | 2 +- .../interfaces/WebSocket/close/close-connecting.html | 2 +- websockets/interfaces/WebSocket/close/close-nested.html | 2 +- websockets/interfaces/WebSocket/events/003.html | 2 +- websockets/interfaces/WebSocket/events/007.html | 2 +- websockets/interfaces/WebSocket/events/009.html | 2 +- websockets/keeping-connection-open/001.html | 2 +- websockets/opening-handshake/001.html | 2 +- websockets/opening-handshake/002.html | 2 +- websockets/unload-a-document/002.html | 2 +- websockets/unload-a-document/004.html | 2 +- websockets/unload-a-document/005.html | 2 +- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/websockets/binary/002.html b/websockets/binary/002.html index f2fa16a61a1804..2e47a88d76c55d 100644 --- a/websockets/binary/002.html +++ b/websockets/binary/002.html @@ -23,5 +23,5 @@ t.done(); }); -}, null, {timeout:20000}); +}, null); diff --git a/websockets/binary/004.html b/websockets/binary/004.html index 59b06d700ab519..ec787422a042dc 100644 --- a/websockets/binary/004.html +++ b/websockets/binary/004.html @@ -22,5 +22,5 @@ t.done(); }) -}, null, {timeout:20000}); +}, null); diff --git a/websockets/constructor/013.html b/websockets/constructor/013.html index fe777af1966093..ea732a7abd8796 100644 --- a/websockets/constructor/013.html +++ b/websockets/constructor/013.html @@ -36,6 +36,6 @@ }, ws[i]); ws[i].onerror = t.step_func(function() {assert_unreached()}); } -}, null, {timeout:25000}); +}, null); diff --git a/websockets/cookies/003.html b/websockets/cookies/003.html index 62c9a27c1dfe2d..25259119612052 100644 --- a/websockets/cookies/003.html +++ b/websockets/cookies/003.html @@ -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); diff --git a/websockets/cookies/004.html b/websockets/cookies/004.html index 558d56c838e5b6..6d4c49a6f1af2f 100644 --- a/websockets/cookies/004.html +++ b/websockets/cookies/004.html @@ -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) diff --git a/websockets/cookies/007.html b/websockets/cookies/007.html index dd47ffc5b798d9..0431b6508deb44 100644 --- a/websockets/cookies/007.html +++ b/websockets/cookies/007.html @@ -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); diff --git a/websockets/extended-payload-length.html b/websockets/extended-payload-length.html index 9e586a98d76574..a5ea78fa5daba9 100644 --- a/websockets/extended-payload-length.html +++ b/websockets/extended-payload-length.html @@ -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'); @@ -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'); @@ -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'); @@ -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"); diff --git a/websockets/interfaces/CloseEvent/clean-close.html b/websockets/interfaces/CloseEvent/clean-close.html index acc71851678230..4e8f5b8c439b9c 100644 --- a/websockets/interfaces/CloseEvent/clean-close.html +++ b/websockets/interfaces/CloseEvent/clean-close.html @@ -19,5 +19,5 @@ assert_equals(e.wasClean,true); t.done(); }); -}, null, {timeout:2000}); +}, null); diff --git a/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html b/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html index 677423736efa96..6828c2bd10e7c1 100644 --- a/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html +++ b/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html @@ -23,5 +23,5 @@ assert_equals(e.data, data); t.done(); }) -}, null, {timeout:20000}); +}, null); diff --git a/websockets/interfaces/WebSocket/close/close-basic.html b/websockets/interfaces/WebSocket/close/close-basic.html index ab6c93b6173a08..08e496d7b6185e 100644 --- a/websockets/interfaces/WebSocket/close/close-basic.html +++ b/websockets/interfaces/WebSocket/close/close-basic.html @@ -22,5 +22,5 @@ }); ws.close(); assert_equals(ws.readyState, ws.CLOSING); -}, undefined, {timeout:9900}); +}, undefined); diff --git a/websockets/interfaces/WebSocket/close/close-connecting.html b/websockets/interfaces/WebSocket/close/close-connecting.html index 009d6b066f3822..be858fc413edcd 100644 --- a/websockets/interfaces/WebSocket/close/close-connecting.html +++ b/websockets/interfaces/WebSocket/close/close-connecting.html @@ -21,5 +21,5 @@ }); }, 1000); ws.onopen = ws.onclose = t.unreached_func(); -}, undefined, {timeout:12000}); +}, undefined); diff --git a/websockets/interfaces/WebSocket/close/close-nested.html b/websockets/interfaces/WebSocket/close/close-nested.html index fa30c8384c1b3f..be993db1dd32af 100644 --- a/websockets/interfaces/WebSocket/close/close-nested.html +++ b/websockets/interfaces/WebSocket/close/close-nested.html @@ -24,5 +24,5 @@ }); ws.close(); assert_equals(ws.readyState, ws.CLOSING); -}, undefined, {timeout:9900}); +}, undefined); diff --git a/websockets/interfaces/WebSocket/events/003.html b/websockets/interfaces/WebSocket/events/003.html index a9b76d84f3d536..6c348bf1e8411f 100644 --- a/websockets/interfaces/WebSocket/events/003.html +++ b/websockets/interfaces/WebSocket/events/003.html @@ -17,5 +17,5 @@ var ev = document.createEvent('UIEvents'); ev.initUIEvent('open', false, false, window, 5); ws.dispatchEvent(ev); -}, null, {timeout:2000}); +}, null); diff --git a/websockets/interfaces/WebSocket/events/007.html b/websockets/interfaces/WebSocket/events/007.html index 4305097d125d41..67c1ebd17fce42 100644 --- a/websockets/interfaces/WebSocket/events/007.html +++ b/websockets/interfaces/WebSocket/events/007.html @@ -17,5 +17,5 @@ var ev = document.createEvent('UIEvents'); ev.initUIEvent('message', false, false, window, 5); ws.dispatchEvent(ev); -}, null, {timeout:2000}); +}, null); diff --git a/websockets/interfaces/WebSocket/events/009.html b/websockets/interfaces/WebSocket/events/009.html index dc25884ce0e0d1..38f1f573f82398 100644 --- a/websockets/interfaces/WebSocket/events/009.html +++ b/websockets/interfaces/WebSocket/events/009.html @@ -17,5 +17,5 @@ var ev = document.createEvent('UIEvents'); ev.initUIEvent('close', false, false, window, 5); ws.dispatchEvent(ev); -}, null, {timeout:2000}); +}, null); diff --git a/websockets/keeping-connection-open/001.html b/websockets/keeping-connection-open/001.html index 2e5423c609dcba..4c5e717a423e76 100644 --- a/websockets/keeping-connection-open/001.html +++ b/websockets/keeping-connection-open/001.html @@ -24,5 +24,5 @@ }); }, 20000); }) -}, null, {timeout:30000}); +}, null); diff --git a/websockets/opening-handshake/001.html b/websockets/opening-handshake/001.html index 727415062a0524..61cef5c3a9b4ce 100644 --- a/websockets/opening-handshake/001.html +++ b/websockets/opening-handshake/001.html @@ -15,5 +15,5 @@ t.step_timeout(() => t.done(), 50); }); ws.onmessage = ws.onopen = t.unreached_func(); -}, null, {timeout:9900}); +}, null); diff --git a/websockets/opening-handshake/002.html b/websockets/opening-handshake/002.html index 052e6445da3412..9ada29dd4f8f82 100644 --- a/websockets/opening-handshake/002.html +++ b/websockets/opening-handshake/002.html @@ -19,5 +19,5 @@ ws.close(); }); ws.onerror = ws.onmessage = ws.onclose = t.unreached_func(); -}, null, {timeout:9900}); +}, null); diff --git a/websockets/unload-a-document/002.html b/websockets/unload-a-document/002.html index 03764c345e9a12..e847dc5161ab58 100644 --- a/websockets/unload-a-document/002.html +++ b/websockets/unload-a-document/002.html @@ -10,7 +10,7 @@

Test requires popup blocker disabled

diff --git a/websockets/binary/004.html b/websockets/binary/004.html index ec787422a042dc..2c4e46a2d380dc 100644 --- a/websockets/binary/004.html +++ b/websockets/binary/004.html @@ -22,5 +22,5 @@ t.done(); }) -}, null); +}); diff --git a/websockets/constructor/013.html b/websockets/constructor/013.html index ea732a7abd8796..a581bc15131302 100644 --- a/websockets/constructor/013.html +++ b/websockets/constructor/013.html @@ -36,6 +36,6 @@ }, ws[i]); ws[i].onerror = t.step_func(function() {assert_unreached()}); } -}, null); +}); diff --git a/websockets/cookies/003.html b/websockets/cookies/003.html index 25259119612052..219f05f193af60 100644 --- a/websockets/cookies/003.html +++ b/websockets/cookies/003.html @@ -29,5 +29,5 @@ ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)}); }); document.body.appendChild(iframe); -}, null); +}); diff --git a/websockets/cookies/004.html b/websockets/cookies/004.html index 6d4c49a6f1af2f..b4d05fbec13e5c 100644 --- a/websockets/cookies/004.html +++ b/websockets/cookies/004.html @@ -27,5 +27,5 @@ }); ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)}); document.body.appendChild(iframe); -}, null) +}); diff --git a/websockets/cookies/007.html b/websockets/cookies/007.html index 0431b6508deb44..b1654f5b3cadf5 100644 --- a/websockets/cookies/007.html +++ b/websockets/cookies/007.html @@ -31,5 +31,5 @@ if (new RegExp('ws_test_'+cookie_id+'=test').test(document.cookie)) { assert_unreached('cookie was set during script execution'); } -}, null); +}); diff --git a/websockets/interfaces/CloseEvent/clean-close.html b/websockets/interfaces/CloseEvent/clean-close.html index 4e8f5b8c439b9c..ad22107287a070 100644 --- a/websockets/interfaces/CloseEvent/clean-close.html +++ b/websockets/interfaces/CloseEvent/clean-close.html @@ -19,5 +19,5 @@ assert_equals(e.wasClean,true); t.done(); }); -}, null); +}); diff --git a/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html b/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html index 6828c2bd10e7c1..c9f15b082c79b4 100644 --- a/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html +++ b/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html @@ -23,5 +23,5 @@ assert_equals(e.data, data); t.done(); }) -}, null); +}); diff --git a/websockets/interfaces/WebSocket/close/close-basic.html b/websockets/interfaces/WebSocket/close/close-basic.html index 08e496d7b6185e..673f730cfaee08 100644 --- a/websockets/interfaces/WebSocket/close/close-basic.html +++ b/websockets/interfaces/WebSocket/close/close-basic.html @@ -22,5 +22,5 @@ }); ws.close(); assert_equals(ws.readyState, ws.CLOSING); -}, undefined); +}); diff --git a/websockets/interfaces/WebSocket/close/close-connecting.html b/websockets/interfaces/WebSocket/close/close-connecting.html index be858fc413edcd..3e9e51b319e527 100644 --- a/websockets/interfaces/WebSocket/close/close-connecting.html +++ b/websockets/interfaces/WebSocket/close/close-connecting.html @@ -21,5 +21,5 @@ }); }, 1000); ws.onopen = ws.onclose = t.unreached_func(); -}, undefined); +}); diff --git a/websockets/interfaces/WebSocket/close/close-nested.html b/websockets/interfaces/WebSocket/close/close-nested.html index be993db1dd32af..3ba99af966f407 100644 --- a/websockets/interfaces/WebSocket/close/close-nested.html +++ b/websockets/interfaces/WebSocket/close/close-nested.html @@ -24,5 +24,5 @@ }); ws.close(); assert_equals(ws.readyState, ws.CLOSING); -}, undefined); +}); diff --git a/websockets/interfaces/WebSocket/events/003.html b/websockets/interfaces/WebSocket/events/003.html index 6c348bf1e8411f..430ea14f6775be 100644 --- a/websockets/interfaces/WebSocket/events/003.html +++ b/websockets/interfaces/WebSocket/events/003.html @@ -17,5 +17,5 @@ var ev = document.createEvent('UIEvents'); ev.initUIEvent('open', false, false, window, 5); ws.dispatchEvent(ev); -}, null); +}); diff --git a/websockets/interfaces/WebSocket/events/007.html b/websockets/interfaces/WebSocket/events/007.html index 67c1ebd17fce42..1e4f2361c5a08f 100644 --- a/websockets/interfaces/WebSocket/events/007.html +++ b/websockets/interfaces/WebSocket/events/007.html @@ -17,5 +17,5 @@ var ev = document.createEvent('UIEvents'); ev.initUIEvent('message', false, false, window, 5); ws.dispatchEvent(ev); -}, null); +}); diff --git a/websockets/interfaces/WebSocket/events/009.html b/websockets/interfaces/WebSocket/events/009.html index 38f1f573f82398..58df1d618172b9 100644 --- a/websockets/interfaces/WebSocket/events/009.html +++ b/websockets/interfaces/WebSocket/events/009.html @@ -17,5 +17,5 @@ var ev = document.createEvent('UIEvents'); ev.initUIEvent('close', false, false, window, 5); ws.dispatchEvent(ev); -}, null); +}); diff --git a/websockets/keeping-connection-open/001.html b/websockets/keeping-connection-open/001.html index 4c5e717a423e76..f6d77a65ee8e60 100644 --- a/websockets/keeping-connection-open/001.html +++ b/websockets/keeping-connection-open/001.html @@ -24,5 +24,5 @@ }); }, 20000); }) -}, null); +}); diff --git a/websockets/opening-handshake/001.html b/websockets/opening-handshake/001.html index 61cef5c3a9b4ce..e0e9b4e2eab47e 100644 --- a/websockets/opening-handshake/001.html +++ b/websockets/opening-handshake/001.html @@ -15,5 +15,5 @@ t.step_timeout(() => t.done(), 50); }); ws.onmessage = ws.onopen = t.unreached_func(); -}, null); +}); diff --git a/websockets/opening-handshake/002.html b/websockets/opening-handshake/002.html index 9ada29dd4f8f82..95139e199eb9dc 100644 --- a/websockets/opening-handshake/002.html +++ b/websockets/opening-handshake/002.html @@ -19,5 +19,5 @@ ws.close(); }); ws.onerror = ws.onmessage = ws.onclose = t.unreached_func(); -}, null); +}); diff --git a/websockets/unload-a-document/002.html b/websockets/unload-a-document/002.html index e847dc5161ab58..94028e70386313 100644 --- a/websockets/unload-a-document/002.html +++ b/websockets/unload-a-document/002.html @@ -10,7 +10,7 @@

Test requires popup blocker disabled