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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-open-javascript-url-leading-format-char.html

Issue 858001: Merge WebKit r55822:... (Closed) Base URL: svn://chrome-svn/chrome/branches/249/src/
Patch Set: Created 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-open-javascript-url-leading-format-char-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-open-javascript-url-leading-format-char.html
===================================================================
--- third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-open-javascript-url-leading-format-char.html (revision 0)
+++ third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-open-javascript-url-leading-format-char.html (revision 41087)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+function runTest() {
+ // Schedule a return to the main event loop so that the javascript: URL
+ // has a chance to run.
+ setTimeout(done, 0);
+ window.open("\u0000javascript:alert('FAIL')", "tg");
+}
+function done() {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+}
+</script>
+</head>
+<body>
+This test passes if there is no alert dialog and the iframe contains a broken
+link.<br />
+<iframe onload="runTest()" name="tg"
+ src="http://localhost:8080/security/resources/innocent-victim.html"
+ ></iframe>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-open-javascript-url-leading-format-char-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698