chore: fix race in test Frame.waitForFunction should work when context is destroyed (#9368)

Fixes the race condition which causes intermittent failures in Firefox
because we haven't implemented bootstrap scripts to run on document
creation.
This commit is contained in:
Henrik Skupin 2022-12-06 17:59:44 +01:00 committed by GitHub
parent 51d75a0a50
commit be7626bad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -2124,13 +2124,19 @@
"expectations": ["PASS", "FAIL"] "expectations": ["PASS", "FAIL"]
}, },
{ {
"testIdPattern": "[waittask.spec] waittask specs Frame.waitForSelector should survive cross-process navigation", "testIdPattern": "[waittask.spec] waittask specs Frame.waitForFunction should survive cross-process navigation",
"platforms": ["darwin", "linux", "win32"], "platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox"], "parameters": ["firefox"],
"expectations": ["PASS", "FAIL"] "expectations": ["PASS", "FAIL"]
}, },
{ {
"testIdPattern": "[waittask.spec] waittask specs Frame.waitForFunction should survive cross-process navigation", "testIdPattern": "[waittask.spec] waittask specs Frame.waitForFunction should work when resolved right before execution context disposal",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox"],
"expectations": ["SKIP"]
},
{
"testIdPattern": "[waittask.spec] waittask specs Frame.waitForSelector should survive cross-process navigation",
"platforms": ["darwin", "linux", "win32"], "platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox"], "parameters": ["firefox"],
"expectations": ["PASS", "FAIL"] "expectations": ["PASS", "FAIL"]

View File

@ -48,6 +48,7 @@ describe('waittask specs', function () {
await page.waitForFunction(() => { await page.waitForFunction(() => {
if (!(globalThis as any).__RELOADED) { if (!(globalThis as any).__RELOADED) {
window.location.reload(); window.location.reload();
return false;
} }
return true; return true;
}); });