blob: 51f66f3d7069b83710bf72d3e2cd9fd1f37f1375 [file] [log] [blame]
<!DOCTYPE html>
<head>
<title>document.domain + self.origin</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
if (document.location.hostname == "127.0.0.1")
document.location = "http://subdomain.example.test:8000/security/document-domain-self-origin.html";
</script>
</head>
<body>
<script>
test(function() {
assert_equals(self.origin, 'http://subdomain.example.test:8000');
assert_equals(document.domain, 'subdomain.example.test');
document.domain = 'example.test';
assert_equals(self.origin, 'http://subdomain.example.test:8000');
assert_equals(document.domain, 'example.test');
}, 'document.domain does not effect self.origin.');
</script>