mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +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
|
@ -29953,6 +29953,12 @@
|
|||
"deleted": [],
|
||||
"items": {
|
||||
"testharness": {
|
||||
"html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html": [
|
||||
{
|
||||
"path": "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html",
|
||||
"url": "/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain.html"
|
||||
}
|
||||
],
|
||||
"html/semantics/forms/form-submission-0/url-encoded.html": [
|
||||
{
|
||||
"path": "html/semantics/forms/form-submission-0/url-encoded.html",
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[send-after-setting-document-domain.htm]
|
||||
type: testharness
|
||||
[loading documents from original origin after setting document.domain]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[document_domain.html]
|
||||
type: testharness
|
||||
[new document]
|
||||
expected: FAIL
|
|
@ -9003,9 +9003,6 @@
|
|||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "enableStyleSheetsForSet" with the proper type (33)]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "domain" with the proper type (35)]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "referrer" with the proper type (36)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -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