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/cross-frame-access-parent-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
Index: LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html
diff --git a/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html b/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html
new file mode 100644
index 0000000000000000000000000000000000000000..1235b6a483d2c27867adf4c92eecac735f08020a
--- /dev/null
+++ b/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html
@@ -0,0 +1,34 @@
+<!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>
+description('Tests that isolated worlds do not allow cross-origin frame access');
+window.jsTestIsAsync = true;
+
+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();
+ iframe.src = 'http://127.0.0.1:8080/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>

Powered by Google App Engine
This is Rietveld 408576698