| <!DOCTYPE html> |
| <head> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script> |
| </script> |
| </head> |
| <body> |
| |
| <script> |
| if (document.location.hostname == "127.0.0.1") { |
| document.location.hostname = "subdomain.example.test"; |
| } else { |
| test(function() { |
| document.domain = 'EXAMPLE.TEST'; |
| assert_equals(document.domain, 'example.test'); |
| |
| document.domain = 'subdomain.eXamPle.tEst'; |
| assert_equals(document.domain, 'subdomain.example.test'); |
| }, 'document.domain goes through proper canonicalization.'); |
| } |
| </script> |
| |