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

Unified Diff: LayoutTests/http/tests/security/xss-DENIED-window-index-assign.html

Issue 19923006: Test assignment to indexed window properties (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | LayoutTests/http/tests/security/xss-DENIED-window-index-assign-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/xss-DENIED-window-index-assign.html
diff --git a/LayoutTests/http/tests/security/xss-DENIED-window-index-assign.html b/LayoutTests/http/tests/security/xss-DENIED-window-index-assign.html
new file mode 100644
index 0000000000000000000000000000000000000000..a6b54a1fe164a474f4e2257260378346bec97179
--- /dev/null
+++ b/LayoutTests/http/tests/security/xss-DENIED-window-index-assign.html
@@ -0,0 +1,13 @@
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+window[0] = {
+ a: "1",
+ f: function() {
+ alert("FAIL: Child called parent.f()");
+ }
+};
+</script>
+<iframe src="data:text/html,<script>alert(parent[0].a);</script><script>parent[0].f();</script>"></iframe><br>
adamk 2013/07/22 23:19:28 Does this load synchronously? If not, you may need
abarth-chromium 2013/07/22 23:24:52 Nope. The only frames that load synchronously are
+This test passes if the access is forbidden.
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/xss-DENIED-window-index-assign-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698