Skip to content

Commit

Permalink
Use pagehide instead of unload in test.
Browse files Browse the repository at this point in the history
BrowserInitiatedLoadPostCommitErrorPageIgnoredForFramePendingDeletion
just needs to send a message at unload-time, so pagehide is ok.

Bug: 1488371
Change-Id: Idc0452a3ef3abdabd4080365b0fae6db43ea377c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5064827
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1230471}
  • Loading branch information
fergald authored and Chromium LUCI CQ committed Nov 29, 2023
1 parent b0a4d5d commit 81f5fd8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17190,10 +17190,10 @@ IN_PROC_BROWSER_TEST_P(

RenderFrameHost* frame = shell()->web_contents()->GetPrimaryMainFrame();

// Create an unload handler and force the browser process to wait before
// Create a pagehide handler and force the browser process to wait before
// deleting |frame|.
EXPECT_TRUE(ExecJs(frame, R"(
window.onunload=function(e){
window.onpagehide=function(e){
window.domAutomationController.send('done');
};)"));

Expand Down

0 comments on commit 81f5fd8

Please sign in to comment.