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

Unified Diff: webkit/data/layout_tests/chrome/http/tests/security/isolatedWorld/iframe-all-window-prototype.html

Issue 149193: Add some test for isolated worlds. These tests don't run properly at the mom... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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: webkit/data/layout_tests/chrome/http/tests/security/isolatedWorld/iframe-all-window-prototype.html
===================================================================
--- webkit/data/layout_tests/chrome/http/tests/security/isolatedWorld/iframe-all-window-prototype.html (revision 0)
+++ webkit/data/layout_tests/chrome/http/tests/security/isolatedWorld/iframe-all-window-prototype.html (revision 0)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div id="console"></div>
+<iframe src="about:blank"></iframe>
+<script>
+var wnd = frames[0];
+for (p in wnd) {
+ var obj = wnd[p];
+ if (obj)
+ obj.__proto__.foo = "FAIL: Visible in isolated world.";
+}
+
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.queueScriptInIsolatedWorld(
+ "var wnd = frames[0];\n" +
+ "for (p in wnd) {\n" +
+ " var obj = wnd[p];\n" +
+ " if (obj) {\n" +
+ " var div = document.createElement('div');\n" +
+ " div.innerHTML = p + ': ' + obj.foo;\n" +
+ " document.getElementById('console').appendChild(div);\n" +
+ " }\n" +
+ "}");
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698