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

Side by Side Diff: LayoutTests/http/tests/security/resources/cross-frame-iframe-for-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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script>
5 testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123');
6 runTestInWorld(2, 'accessParentDocument');
7
8 function runTestInWorld(worldId, funcName)
9 {
10 testRunner.evaluateScriptInIsolatedWorld(
11 worldId, String(eval(funcName)) + "\n" + funcName + "();");
12 }
13
14 function accessParentDocument()
15 {
16 function debug(message) {
17 window.parent.postMessage(JSON.stringify({ 'type' : 'debug', 'message' : message }), '*');
18 }
19 function finish() {
20 window.parent.postMessage(JSON.stringify({ 'type' : 'finish' }), '*');
21 }
22 var description = 'Parent document access from isolated world is not allowed .';
23 try {
24 var doc = window.parent.document;
25 debug('FAIL ' + description);
26 } catch (e) {
27 debug('PASS ' + description);
28 }
29 finish();
30 }
31 </script>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698