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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-change-document-domain.html

Issue 2370843003: Suborigin LayoutTest formatting and refactoring (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8">
4 <title>Validate that a frame can't change it's document.domain and enter the sub origin</title> 5 <title>Validate that a frame can't change it's document.domain and enter the sub origin</title>
5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 7 <script src="/resources/testharnessreport.js"></script>
7 </head> 8 </head>
8 <script> 9 <script>
9 document.domain = '127.0.0.1'; 10 document.domain = '127.0.0.1';
10 window.secret = 'Unchanged'; 11 window.secret = 'Unchanged';
11 window.onmessage = function(event) { 12 window.onmessage = function(event) {
12 assert_equals(secret, 'Unchanged', 'secret should not be touchable by the ch ild in a suborigin.'); 13 assert_equals(secret, 'Unchanged',
13 assert_equals(event.data, 'SecurityError: Blocked a frame with origin \"http -so://foobar.127.0.0.1:8000\" from accessing a cross-origin frame.'); 14 'secret should not be touchable by the child in a suborigin.');
14 done(); 15 assert_equals(event.data,
16 'SecurityError: Blocked a frame with origin ' +
17 '\"http-so://foobar.127.0.0.1:8000\" from accessing a cross-origin ' +
18 'frame.');
19 done();
15 }; 20 };
16 </script> 21 </script>
17 <iframe src="resources/child-changes-document-domain.php?suborigin=foobar"></ifr ame> 22 <iframe src="resources/child-changes-document-domain.php?suborigin=foobar"></ifr ame>
18 </html> 23 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698