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

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

Issue 1911493004: Don't copy the security origin when creating a document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 8 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 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <script> 6 <script>
7 if (document.location.hostname == "127.0.0.1") { 7 if (document.location.hostname == "127.0.0.1") {
8 document.location.hostname = "subdomain.example.test"; 8 document.location.hostname = "subdomain.example.test";
9 } else { 9 } else {
10 test(function () { 10 test(function () {
11 var doc = document.implementation.createDocument(null, 'one', nu ll); 11 var doc = document.implementation.createDocument(null, 'one', nu ll);
12 12
13 assert_equals(document.domain, 'subdomain.example.test'); 13 assert_equals(document.domain, 'subdomain.example.test');
14 assert_equals(doc.domain, 'subdomain.example.test'); 14 assert_equals(doc.domain, 'subdomain.example.test');
15 15
16 document.domain = 'example.test'; 16 document.domain = 'example.test';
17 assert_equals(document.domain, 'example.test'); 17 assert_equals(document.domain, 'example.test');
18 assert_equals(doc.domain, 'subdomain.example.test'); 18 assert_equals(doc.domain, 'example.test');
19 19
20 document.domain = 'subdomain.example.test'; 20 document.domain = 'subdomain.example.test';
21 }, "Documents created using createDocument do not share the underlyi ng domain."); 21 }, "Documents created using createDocument share the underlying doma in.");
22 } 22 }
23 </script> 23 </script>
24 </head> 24 </head>
25 <body> 25 <body>
26 </body> 26 </body>
27 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698