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

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

Issue 174073007: Remove deprecated window.showModalDialog() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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="/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: Failed to execute \'setTimeout\' on \'Window\': Blocked a frame with ori gin \\"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: Failed to execute \'setInterval\' on \'Window\': Blocked a frame with o rigin \\"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: 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: Failed to execute \'open\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1 :8000\\" from accessing a cross-origin frame."'); 30 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: Faile d to execute \'getSelection\' on \'Window\': Blocked a frame with origin \\"http ://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 31 shouldThrow("window.getSelection.call(targetWindow)", '"SecurityError: Faile d to execute \'getSelection\' on \'Window\': 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: Failed to execute \'find\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross- origin frame."'); 32 shouldThrow("window.find.call(targetWindow, 'string', false, false, false, f alse, false, false)", '"SecurityError: Failed to execute \'find\' on \'Window\': 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: Failed to execute \'confirm\' on \'Window\': Blocked a frame with origin \\"htt p://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 33 shouldThrow("window.confirm.call(targetWindow, 'message')", '"SecurityError: Failed to execute \'confirm\' on \'Window\': Blocked a frame with origin \\"htt p://127.0.0.1:8000\\" from accessing a cross-origin frame."');
35 shouldThrow("window.prompt.call(targetWindow, 'message', 'defaultValue')", ' "SecurityError: Failed to execute \'prompt\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 34 shouldThrow("window.prompt.call(targetWindow, 'message', 'defaultValue')", ' "SecurityError: Failed to execute \'prompt\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
36 shouldThrow("window.getComputedStyle.call(targetWindow, document.body, '')", '"SecurityError: Failed to execute \'getComputedStyle\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin fr ame."'); 35 shouldThrow("window.getComputedStyle.call(targetWindow, document.body, '')", '"SecurityError: Failed to execute \'getComputedStyle\' on \'Window\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin fr ame."');
37 shouldThrow("window.getMatchedCSSRules.call(targetWindow, document.body, '') ", '"SecurityError: Failed to execute \'getMatchedCSSRules\' on \'Window\': Bloc ked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origi n frame."'); 36 shouldThrow("window.getMatchedCSSRules.call(targetWindow, document.body, '') ", '"SecurityError: Failed to execute \'getMatchedCSSRules\' on \'Window\': Bloc ked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origi n frame."');
38 shouldThrow("window.openDatabase.call(targetWindow, 'name', '1.0', 'descript ion', 0)", '"SecurityError: Failed to execute \'openDatabase\' on \'Window\': Bl ocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-ori gin frame."'); 37 shouldThrow("window.openDatabase.call(targetWindow, 'name', '1.0', 'descript ion', 0)", '"SecurityError: Failed to execute \'openDatabase\' on \'Window\': Bl ocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-ori gin frame."');
39 shouldThrow("window.atob.call(targetWindow, 'string')", '"SecurityError: Fai led to execute \'atob\' on \'Window\': Blocked a frame with origin \\"http://127 .0.0.1:8000\\" from accessing a cross-origin frame."'); 38 shouldThrow("window.atob.call(targetWindow, 'string')", '"SecurityError: Fai led to execute \'atob\' on \'Window\': Blocked a frame with origin \\"http://127 .0.0.1:8000\\" from accessing a cross-origin frame."');
40 shouldThrow("window.btoa.call(targetWindow, 'string')", '"SecurityError: Fai led to execute \'btoa\' on \'Window\': Blocked a frame with origin \\"http://127 .0.0.1:8000\\" from accessing a cross-origin frame."'); 39 shouldThrow("window.btoa.call(targetWindow, 'string')", '"SecurityError: Fai led to execute \'btoa\' on \'Window\': Blocked a frame with origin \\"http://127 .0.0.1:8000\\" from accessing a cross-origin frame."');
(...skipping 18 matching lines...) Expand all
59 // - Tests for the Location object - 58 // - Tests for the Location object -
60 shouldThrow("window.location.toString.call(targetWindow.location)", '"Securi tyError: Failed to execute \'toString\' on \'Location\': Blocked a frame with or igin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); 59 shouldThrow("window.location.toString.call(targetWindow.location)", '"Securi tyError: Failed to execute \'toString\' on \'Location\': Blocked a frame with or igin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
61 60
62 // Work around DRT bug that causes subsequent tests to fail. 61 // Work around DRT bug that causes subsequent tests to fail.
63 window.stop(); 62 window.stop();
64 finishJSTest(); 63 finishJSTest();
65 } 64 }
66 </script> 65 </script>
67 </body> 66 </body>
68 </html> 67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698