Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/page-visibility-unload.html

Issue 1778753003: Fire visibilitychange event on unload (behind the flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/events/page-visibility-unload.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/page-visibility-unload.html b/third_party/WebKit/LayoutTests/fast/events/page-visibility-unload.html
new file mode 100644
index 0000000000000000000000000000000000000000..eeec15588c2421a269cae044166860fdb54477da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/page-visibility-unload.html
@@ -0,0 +1,22 @@
+<html>
+<body onload="load()">
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function load()
+{
+ document.addEventListener("visibilitychange", onVisibilityChange, false);
+ location = "data:text/html,You should have seen a warning message for alert dialog.<script>if (window.testRunner) testRunner.notifyDone(); </" + "script>";
+}
+
+function onVisibilityChange()
+{
+ alert("visibilitychanged");
+}
+</script>
+start document
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698