OLD | NEW |
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> |
OLD | NEW |