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

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: Added layout test. 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 <html>
jochen (gone - plz use gerrit) 2015/09/14 08:56:35 nit. add <!DOCTYPE html>
epertoso 2015/09/14 09:13:50 Done.
2 <body>
3 <script>
4 testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123');
5 runTestInWorld(2, 'accessParentDocument');
6
7 function runTestInWorld(worldId, funcName)
8 {
9 testRunner.evaluateScriptInIsolatedWorld(
10 worldId, String(eval(funcName)) + "\n" + funcName + "();");
11 }
12
13 function accessParentDocument()
14 {
15 function debug(message) {
16 window.parent.postMessage(JSON.stringify({ 'type' : 'debug', 'message' : message }), '*');
17 }
18 function finish() {
19 window.parent.postMessage(JSON.stringify({ 'type' : 'finish' }), '*');
20 }
21 var description = 'Parent document access from isolated world is not allowed .'
22 try {
23 var doc = window.parent.document;
24 debug('FAIL ' + description);
25 } catch (e) {
26 debug('PASS ' + description);
27 }
28 finish();
29 }
30 </script>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698