Changeset 234061 in webkit
- Timestamp:
- Jul 20, 2018 12:34:09 PM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r234056 r234061 1 2018-07-20 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION(PSON?): [ WK2 ] http/tests/workers/service/client-*-page-cache.html LayoutTests are flaky 4 https://bugs.webkit.org/show_bug.cgi?id=183705 5 6 Reviewed by Youenn Fablet. 7 8 At the beginning of the tests, wait for the client count to reach the expected value instead of 9 expecting it to be the right value right away. Clients unregister themselves asynchronously so 10 it is flaky otherwise. 11 12 * http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html: 13 * http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html: 14 * http/tests/workers/service/serviceworkerclients-matchAll-worker.js: 15 (async.doTestAfterMessage): 16 1 17 2018-07-20 Basuke Suzuki <Basuke.Suzuki@sony.com> 2 18 -
trunk/LayoutTests/http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html
r226677 r234061 12 12 } 13 13 14 let tries = 0; 15 14 16 navigator.serviceWorker.addEventListener("message", function(event) { 15 17 if (step == "BothClientsInitiallyActive") { 16 18 if (event.data != 2) { 17 log("FAIL: Wrong initial number of clients: " + event.data); 18 finishSWTest(); 19 if (++tries > 20) { 20 log("FAIL: Wrong initial number of clients: " + event.data); 21 finishSWTest(); 22 return; 23 } 24 worker.postMessage("getClientCount"); 19 25 return; 20 26 } -
trunk/LayoutTests/http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html
r226677 r234061 12 12 } 13 13 14 let tries = 0; 15 14 16 navigator.serviceWorker.addEventListener("message", function(event) { 15 17 if (step == "BothClientsInitiallyActive") { 16 18 if (event.data != 2) { 17 log("FAIL: Wrong initial number of clients: " + event.data); 18 finishSWTest(); 19 if (++tries > 20) { 20 log("FAIL: Wrong initial number of clients: " + event.data); 21 finishSWTest(); 22 return; 23 } 24 worker.postMessage("getClientCount"); 19 25 return; 20 26 } -
trunk/LayoutTests/http/tests/workers/service/serviceworkerclients-matchAll-worker.js
r225452 r234061 1 var matchAllPromise1 = self.clients.matchAll().then((clients) => { 2 return clients.length === 0 ? "PASS" : "FAIL: expected no matched client, got " + clients.length; 3 }, (e) => { 4 return "FAIL: matchAll 1 rejected with " + e; 5 }); 6 1 function matchAllPromise1() 2 { 3 return self.clients.matchAll().then((clients) => { 4 return clients.length === 0 ? "PASS" : "FAIL: expected no matched client, got " + clients.length; 5 }, (e) => { 6 return "FAIL: matchAll 1 rejected with " + e; 7 }); 8 } 7 9 8 10 var matchedClients; … … 22 24 } 23 25 24 var result = await matchAllPromise1; 26 let tries = 0; 27 do { 28 if (tries) 29 await waitFor(50); 30 result = await matchAllPromise1(); 31 } while (result !== "PASS" && ++tries <= 20); 32 25 33 if (result !== "PASS") { 26 34 event.source.postMessage(result);
Note: See TracChangeset
for help on using the changeset viewer.