Index: third_party/WebKit/LayoutTests/fast/events/popup-blocked-to-post-blank.html |
=================================================================== |
--- third_party/WebKit/LayoutTests/fast/events/popup-blocked-to-post-blank.html (revision 0) |
+++ third_party/WebKit/LayoutTests/fast/events/popup-blocked-to-post-blank.html (revision 0) |
@@ -0,0 +1,33 @@ |
+<html> |
+<head> |
+<script> |
+if (window.layoutTestController) { |
+ layoutTestController.dumpAsText(); |
+ layoutTestController.setCanOpenWindows(); |
+ layoutTestController.setPopupBlockingEnabled(true); |
+ layoutTestController.setCloseRemainingWindowsWhenComplete(true); |
+ layoutTestController.waitUntilDone(); |
+} |
+ |
+function done() { |
+ if (window.layoutTestController) |
+ layoutTestController.notifyDone(); |
+} |
+ |
+function test() { |
+ var form = document.getElementById('form'); |
+ form.submit(); |
+ // Unfortunately, we need to give the asynchronous POST load a little time |
+ // to run, just in case the test is trying to fail :) |
+ setTimeout("done()", 100); |
+} |
+</script> |
+</head> |
+<body onload="test()"> |
+If the POST pop-up was not blocked then there will be an ALERT containing a |
+DOMWindow object. Otherwise, the test passes. |
+<form id="form" action="data:text/html,<script>alert(window)</script>" target="_blank"> |
+<input type="submit" value="Submit"/> |
+</form> |
+</body> |
+</html> |