Auto merge of #8655 - jdm:domain, r=jdm

Implement document.domain getter

Rebased from #6840 + test fixes.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8655)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-24 06:01:13 +05:30
commit 0905088e83
7 changed files with 50 additions and 10 deletions

View file

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
assert_equals(typeof document.domain, "string", "document.domain is a string");
assert_not_equals(document.domain, "", "document.domain is not empty");
}, "sanity checks");
test(function() {
assert_equals(document.domain, window.location.hostname, "equals location.hostname");
}, "current document");
test(function() {
var doc = new Document();
assert_equals(doc.domain, "", "new document has empty domain");
}, "new document");
</script>
</head>
<body>
</body>
</html>