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

Unified Diff: LayoutTests/http/tests/security/suborigins/multiple-suborigins-disallowed.html

Issue 27073003: CSP Suborigins Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address many of mkwst's comments Created 5 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
Index: LayoutTests/http/tests/security/suborigins/multiple-suborigins-disallowed.html
diff --git a/LayoutTests/http/tests/security/suborigins/multiple-suborigins-disallowed.html b/LayoutTests/http/tests/security/suborigins/multiple-suborigins-disallowed.html
new file mode 100644
index 0000000000000000000000000000000000000000..003af9142f4344f23e42d3923846f74116936eb5
--- /dev/null
+++ b/LayoutTests/http/tests/security/suborigins/multiple-suborigins-disallowed.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Multiple Suborigins Disallowed</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+
+<script>
+
+window.onmessage = function() {
+ var secret = '';
+ try {
+ secret = iframe.contentWindow.secret;
+ assert_unreached();
+ } catch(e) {
+ assert_equals(secret, "", "The parent frame should never be able to get the secret value from the child iframe.");
+ done();
+ };
+};
+
+</script>
+<iframe id="iframe" src="resources/multiple-suborigins.php"></iframe>

Powered by Google App Engine
This is Rietveld 408576698