summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/page-visibility/resources/unload-bubbles.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/page-visibility/resources/unload-bubbles.html')
-rw-r--r--testing/web-platform/tests/page-visibility/resources/unload-bubbles.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/page-visibility/resources/unload-bubbles.html b/testing/web-platform/tests/page-visibility/resources/unload-bubbles.html
new file mode 100644
index 0000000000..cc9e14f787
--- /dev/null
+++ b/testing/web-platform/tests/page-visibility/resources/unload-bubbles.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+<head><title>Document</title></head>
+<body>
+<h1>Document</h1>
+<script>
+window.addEventListener("load", function() {
+ window.addEventListener("visibilitychange", event => {
+ opener.postMessage({
+ target: event.target.nodeName,
+ state: document.visibilityState,
+ bubbles: event.bubbles
+ }, "*");
+ });
+ opener.postMessage("close", "*");
+});
+</script>
+</body>
+</html>