Skip to content

Commit

Permalink
Use pagehide in document-base-url-window-initiator-is-not-opener
Browse files Browse the repository at this point in the history
This test only cares about doing something as the iframe is removed.

Bug: 1488371
Change-Id: I3d99173a80d12cd5cac83f491e16661ba786b9a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5056942
Commit-Queue: Fergal Daly <[email protected]>
Reviewed-by: Rakina Zata Amni <[email protected]>
Auto-Submit: Fergal Daly <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1229135}
  • Loading branch information
fergald authored and chromium-wpt-export-bot committed Nov 27, 2023
1 parent 97ab2cf commit d196931
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const runTest = (description) => {
<body></body>
`;

const popup_unloaded = new Promise(r => window.popup.onunload = e => r());
const popup_navigated = new Promise(r => window.popup.onpagehide = e => r());
document.body.append(iframe);
await popup_unloaded; // This makes sure the old child has unloaded, but
await popup_navigated; // This makes sure the old child has unloaded, but
// with the timeout below it's really not needed.

// This is necessary, or else the test times out. The about:blank load
Expand Down

0 comments on commit d196931

Please sign in to comment.