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

Side by Side Diff: LayoutTests/http/tests/security/cross-origin-window-open-exception.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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 </head> 4 </head>
5 <body> 5 <body>
6 <iframe src="http://localhost:8080/"></iframe> 6 <iframe src="http://localhost:8080/"></iframe>
7 <script src="/js-test-resources/js-test.js"></script> 7 <script src="/js-test-resources/js-test.js"></script>
8 <script> 8 <script>
9 description("Cross-origin access to 'window.open' and 'window.opener' sh ould throw a SecurityError."); 9 description("Cross-origin access to 'window.open' and 'window.opener' sh ould throw a SecurityError.");
10 10
11 window.jsTestIsAsync = true; 11 window.jsTestIsAsync = true;
12 var frame = document.querySelector('iframe'); 12 var frame = document.querySelector('iframe');
13 window.onload = function () { 13 window.onload = function () {
14 shouldThrow("frame.contentWindow.open()", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin fra me."'); 14 shouldThrow("frame.contentWindow.open()", '"SecurityError: Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin fra me."');
15 shouldThrow("frame.contentWindow.opener = 1;", '"SecurityError: Bloc ked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origi n frame."'); 15 shouldThrow("frame.contentWindow.opener = 1;", '"SecurityError: Fail ed to set the \'opener\' property on \'Window\': Blocked a frame with origin \\" http://127.0.0.1:8000\\" from accessing a cross-origin frame."');
16 finishJSTest(); 16 finishJSTest();
17 }; 17 };
18 </script> 18 </script>
19 </body> 19 </body>
20 </html> 20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698