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

Unified Diff: LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-isolated-world.html

Issue 1327263002: Modifies WindowProxy::setSecurityToken so that the frame's SecurityOrigin is taken into account whe… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update Created 5 years, 3 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/cross-frame-access-parent-explicit-domain-isolated-world-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-isolated-world.html
diff --git a/LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-isolated-world.html b/LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-isolated-world.html
new file mode 100644
index 0000000000000000000000000000000000000000..ed1fbd3595d2161963871055b4d2edd15e087eb7
--- /dev/null
+++ b/LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-isolated-world.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<script src="/js-test-resources/js-test.js"></script>
+<body>
+<p id="description"></p>
+<p id="console"></p>
+<iframe src="data:text/html,"></iframe>
+<script>
+window.jsTestIsAsync = true;
+if (document.location.hostname == '127.0.0.1') {
+ document.location.hostname = 'subdomain.example.test';
+} else {
+ description('Tests that isolated worlds do not allow cross-origin frame access');
+
+ if (window.testRunner) {
+ window.addEventListener('message', function(event) {
+ var message = JSON.parse(event.data);
+ switch (message.type) {
+ case 'debug':
+ debug(message.message);
+ break;
+ case 'finish':
+ finishJSTest();
+ break;
+ }
+ });
+
+ testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123');
+ var iframe = document.getElementsByTagName('iframe')[0];
+ iframe.focus();
+ document.domain = 'example.test';
+ iframe.src = 'http://subdomain.example.test:8000/security/resources/cross-frame-iframe-for-parent-isolated-world.html';
+ } else {
+ testFailed('Test depends on LayoutTestController and must be run by DRT');
+ }
+}
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-isolated-world-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698