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

Side by Side Diff: LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html

Issue 19932002: Throw exceptions on all failed cross-origin access checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="resources/cross-frame-access.js"></script> 3 <script src="resources/cross-frame-access.js"></script>
4 <script> 4 <script>
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
8 } 8 }
9 9
10 // Set up listener for message from iframe 10 // Set up listener for message from iframe
11 addEventListener('message', function(event) { 11 addEventListener('message', function(event) {
12 if (event.data == "finishedLoad") 12 if (event.data == "finishedLoad")
13 doTest(); 13 doTest();
14 }, false); 14 }, false);
15 15
16 16
17 doTest = function() 17 doTest = function()
18 { 18 {
19 targetWindow = document.getElementById("target").contentWindow; 19 targetWindow = document.getElementById("target").contentWindow;
20 20
21 shouldBeUndefined("Object.getPrototypeOf(targetWindow)"); 21 shouldThrowException("Object.getPrototypeOf(targetWindow)");
22 22
23 if (window.testRunner) 23 if (window.testRunner)
24 testRunner.notifyDone(); 24 testRunner.notifyDone();
25 } 25 }
26 </script> 26 </script>
27 </head> 27 </head>
28 <body> 28 <body>
29 <div>This tests that you can't get the prototype of the window object cross- origin using Object.getPrototypeOf().</div> 29 <div>This tests that you can't get the prototype of the window object cross- origin using Object.getPrototypeOf().</div>
30 <iframe id="target" src="http://localhost:8000/security/resources/cross-fram e-iframe-for-object-getPrototypeOf-test.html"></iframe> 30 <iframe id="target" src="http://localhost:8000/security/resources/cross-fram e-iframe-for-object-getPrototypeOf-test.html"></iframe>
31 <pre id="console"></pre> 31 <pre id="console"></pre>
32 </body> 32 </body>
33 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698