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

Side by Side Diff: LayoutTests/http/tests/security/isolatedWorld/all-window-properties.html

Issue 13954010: Eliminate "temporary" and "uninitialized" isolated worlds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <div id="console"></div> 4 <div id="console"></div>
5 <script> 5 <script>
6 for (p in window) { 6 for (p in window) {
7 if (p == 'localStorage' || p == 'sessionStorage') continue; 7 if (p == 'localStorage' || p == 'sessionStorage') continue;
8 var obj = window[p]; 8 var obj = window[p];
9 if (obj) 9 if (obj)
10 obj.foo = "FAIL: Visible in isolated world."; 10 obj.foo = "FAIL: Visible in isolated world.";
11 } 11 }
12 12
13 if (window.testRunner) { 13 if (window.testRunner) {
14 testRunner.dumpAsText(); 14 testRunner.dumpAsText();
15 testRunner.evaluateScriptInIsolatedWorld( 15 testRunner.evaluateScriptInIsolatedWorld(
16 0, 16 1,
17 "(function() {\n" + 17 "(function() {\n" +
18 " for (p in window) {\n" + 18 " for (p in window) {\n" +
19 " var obj = window[p];\n" + 19 " var obj = window[p];\n" +
20 " if (obj && obj.foo) {\n" + 20 " if (obj && obj.foo) {\n" +
21 " var div = document.createElement('div');\n" + 21 " var div = document.createElement('div');\n" +
22 " div.innerHTML = p + ': ' + obj.foo;\n" + 22 " div.innerHTML = p + ': ' + obj.foo;\n" +
23 " document.getElementById('console').appendChild(div);\n" + 23 " document.getElementById('console').appendChild(div);\n" +
24 " }\n" + 24 " }\n" +
25 " }\n" + 25 " }\n" +
26 " var div = document.createElement('div');\n" + 26 " var div = document.createElement('div');\n" +
27 " div.innerHTML = 'Done.'\n" + 27 " div.innerHTML = 'Done.'\n" +
28 " document.getElementById('console').appendChild(div);\n" + 28 " document.getElementById('console').appendChild(div);\n" +
29 "})();"); 29 "})();");
30 } 30 }
31 </script> 31 </script>
32 </body> 32 </body>
33 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698