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

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

Issue 91383002: Switch V8WindowCustom to the new-style ExceptionState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Expectations. Created 7 years 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="/js-test-resources/js-test.js"></script> 3 <script src="/js-test-resources/js-test.js"></script>
4 <script src="resources/cross-frame-access.js"></script> 4 <script src="resources/cross-frame-access.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe> 7 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe>
8 <pre id="console"></pre> 8 <pre id="console"></pre>
9 <script> 9 <script>
10 10
11 window.jsTestIsAsync = true; 11 window.jsTestIsAsync = true;
12 window.targetWindow = frames[0]; 12 window.targetWindow = frames[0];
13 13
14 window.onload = function() 14 window.onload = function()
15 { 15 {
16 if (window.testRunner) 16 if (window.testRunner)
17 testRunner.setCanOpenWindows(true); 17 testRunner.setCanOpenWindows(true);
18 18
19 description("\n----- tests for calling methods of another frame using Functi on.call -----\n"); 19 description("\n----- tests for calling methods of another frame using Functi on.call -----\n");
20 20
21 // Allowed 21 // Allowed
22 // void focus(); 22 // void focus();
23 // void blur(); 23 // void blur();
24 // void close(); 24 // void close();
25 // void postMessage(in DOMString message); 25 // void postMessage(in DOMString message);
26 26
27 // - Tests for the Window object - 27 // - Tests for the Window object -
28 shouldThrow("window.setTimeout.call(targetWindow, 'void(0);', 0)", '"Securit yError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 28 shouldThrow("window.setTimeout.call(targetWindow, 'void(0);', 0)", '"Securit yError: Failed to execute \'setTimeout\' on \'Window\': Blocked a frame with ori gin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
29 shouldThrow("window.setInterval.call(targetWindow, 'void(0);', 0)", '"Securi tyError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 29 shouldThrow("window.setInterval.call(targetWindow, 'void(0);', 0)", '"Securi tyError: Failed to execute \'setInterval\' on \'Window\': Blocked a frame with o rigin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
30 shouldThrow("window.showModalDialog.call(targetWindow);", '"SecurityError: B locked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-or igin frame."'); 30 shouldThrow("window.showModalDialog.call(targetWindow);", '"SecurityError: F ailed to execute \'showModalDialog\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
31 shouldThrow("window.open.call(targetWindow, '')", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin fra me."'); 31 shouldThrow("window.open.call(targetWindow, '')", '"SecurityError: Failed to execute \'open\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1 :8000\\" from accessing a cross-origin frame."');
32 shouldThrow("window.getSelection.call(targetWindow)", '"SecurityError: Block ed a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 32 shouldThrow("window.getSelection.call(targetWindow)", '"SecurityError: Block ed a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
33 shouldThrow("window.find.call(targetWindow, 'string', false, false, false, f alse, false, false)", '"SecurityError: Blocked a frame with origin \\"http://127 .0.0.1:8000\\" from accessing a cross-origin frame."'); 33 shouldThrow("window.find.call(targetWindow, 'string', false, false, false, f alse, false, false)", '"SecurityError: Blocked a frame with origin \\"http://127 .0.0.1:8000\\" from accessing a cross-origin frame."');
34 shouldThrow("window.confirm.call(targetWindow, 'message')", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross- origin frame."'); 34 shouldThrow("window.confirm.call(targetWindow, 'message')", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross- origin frame."');
35 shouldThrow("window.prompt.call(targetWindow, 'message', 'defaultValue')", ' "SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from acc essing a cross-origin frame."'); 35 shouldThrow("window.prompt.call(targetWindow, 'message', 'defaultValue')", ' "SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from acc essing a cross-origin frame."');
36 shouldThrow("window.getComputedStyle.call(targetWindow, document.body, '')", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from a ccessing a cross-origin frame."'); 36 shouldThrow("window.getComputedStyle.call(targetWindow, document.body, '')", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from a ccessing a cross-origin frame."');
37 shouldThrow("window.getMatchedCSSRules.call(targetWindow, document.body, '') ", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 37 shouldThrow("window.getMatchedCSSRules.call(targetWindow, document.body, '') ", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
38 shouldThrow("window.openDatabase.call(targetWindow, 'name', '1.0', 'descript ion', 0)", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000 \\" from accessing a cross-origin frame."'); 38 shouldThrow("window.openDatabase.call(targetWindow, 'name', '1.0', 'descript ion', 0)", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000 \\" from accessing a cross-origin frame."');
39 shouldThrow("window.atob.call(targetWindow, 'string')", '"SecurityError: Blo cked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-orig in frame."'); 39 shouldThrow("window.atob.call(targetWindow, 'string')", '"SecurityError: Blo cked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-orig in frame."');
40 shouldThrow("window.btoa.call(targetWindow, 'string')", '"SecurityError: Blo cked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-orig in frame."'); 40 shouldThrow("window.btoa.call(targetWindow, 'string')", '"SecurityError: Blo cked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-orig in frame."');
41 shouldThrow("window.clearTimeout.call(targetWindow, 0);", '"SecurityError: B locked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-or igin frame."'); 41 shouldThrow("window.clearTimeout.call(targetWindow, 0);", '"SecurityError: B locked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-or igin frame."');
(...skipping 17 matching lines...) Expand all
59 // - Tests for the Location object - 59 // - Tests for the Location object -
60 shouldThrow("window.location.toString.call(targetWindow.location)", '"Securi tyError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 60 shouldThrow("window.location.toString.call(targetWindow.location)", '"Securi tyError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
61 61
62 // Work around DRT bug that causes subsequent tests to fail. 62 // Work around DRT bug that causes subsequent tests to fail.
63 window.stop(); 63 window.stop();
64 finishJSTest(); 64 finishJSTest();
65 } 65 }
66 </script> 66 </script>
67 </body> 67 </body>
68 </html> 68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698