Skip to content

Commit

Permalink
chore: fix race in test Frame.waitForFunction should work when contex…
Browse files Browse the repository at this point in the history
…t 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.
  • Loading branch information
whimboo committed Dec 6, 2022
1 parent 51d75a0 commit be7626b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/TestExpectations.json
Expand Up @@ -2124,13 +2124,19 @@
"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"],
"parameters": ["firefox"],
"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"],
"parameters": ["firefox"],
"expectations": ["PASS", "FAIL"]
Expand Down
1 change: 1 addition & 0 deletions test/src/waittask.spec.ts
Expand Up @@ -48,6 +48,7 @@ describe('waittask specs', function () {
await page.waitForFunction(() => {
if (!(globalThis as any).__RELOADED) {
window.location.reload();
return false;
}
return true;
});
Expand Down

0 comments on commit be7626b

Please sign in to comment.