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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/popup-blocked-to-post-blank.html

Issue 1116002: Test CL for WebKit try bot. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/popup-blocked-to-post-blank-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/popup-blocked-to-post-blank-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698