mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
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:
commit
0905088e83
7 changed files with 50 additions and 10 deletions
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue