Skip to content

Commit

Permalink
Unload: post close message on pagehide instead of unload
Browse files Browse the repository at this point in the history
These three tests fails because it depends on the "close" message
sent from unload handler. This CL changes it to pagehide handler so
it would be triggered as expected even after unload is deprecated.

Bug: 1488371
Change-Id: I754d38b5997bd6a01ba512f17d434cd260f7801d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5043665
Reviewed-by: Fergal Daly <[email protected]>
Commit-Queue: Mingyu Lei <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1226707}
  • Loading branch information
lozy219 authored and chromium-wpt-export-bot committed Nov 20, 2023
1 parent 82b2beb commit 741f8d2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- Used when testing access of a closed/detached window's properties -->
<html>
<body onunload="opener.postMessage('closed', '*');">
<body onpagehide="opener.postMessage('closed', '*');">
<script>
opener.postMessage("opened", "*");
</script>
Expand Down

0 comments on commit 741f8d2

Please sign in to comment.