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> |