aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-12-08 13:28:12 -0700
committerbors-servo <metajack+bors@gmail.com>2014-12-08 13:28:12 -0700
commitfeabaf34acfc41c0976acdff5e4df15a135d1b09 (patch)
treea03c3e59a471a9f60824acd8b85a621e271679e2
parentf11089cda0564a826ed53949a4b39d519944e28a (diff)
parent6104d5105fb62c7cf55852f04c433411d49d076f (diff)
downloadservo-feabaf34acfc41c0976acdff5e4df15a135d1b09.tar.gz
servo-feabaf34acfc41c0976acdff5e4df15a135d1b09.zip
auto merge of #4270 : ProgramFOX/servo/issue-4252, r=saneyuki
Resolves #4252
-rw-r--r--components/script/dom/document.rs5
-rw-r--r--components/script/dom/webidls/Document.webidl1
-rw-r--r--tests/wpt/metadata/dom/interfaces.html.ini6
-rw-r--r--tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini237
-rw-r--r--tests/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini3
-rw-r--r--tests/wpt/metadata/dom/nodes/Document-constructor.html.ini3
-rw-r--r--tests/wpt/metadata/dom/nodes/Node-properties.html.ini9
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini3
8 files changed, 6 insertions, 261 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 84016cf75fa..4fbdaab837d 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -518,6 +518,11 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
self.encoding_name.borrow().clone()
}
+ // http://dom.spec.whatwg.org/#dom-document-inputencoding
+ fn InputEncoding(self) -> DOMString {
+ self.encoding_name.borrow().clone()
+ }
+
// http://dom.spec.whatwg.org/#dom-document-content_type
fn ContentType(self) -> DOMString {
self.content_type.clone()
diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl
index 9a9272ac824..8d75f20a8f7 100644
--- a/components/script/dom/webidls/Document.webidl
+++ b/components/script/dom/webidls/Document.webidl
@@ -16,6 +16,7 @@ interface Document : Node {
readonly attribute DOMString documentURI;
readonly attribute DOMString compatMode;
readonly attribute DOMString characterSet;
+ readonly attribute DOMString inputEncoding;
readonly attribute DOMString contentType;
readonly attribute DocumentType? doctype;
diff --git a/tests/wpt/metadata/dom/interfaces.html.ini b/tests/wpt/metadata/dom/interfaces.html.ini
index b8a6243783e..941b80264b2 100644
--- a/tests/wpt/metadata/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/dom/interfaces.html.ini
@@ -1128,12 +1128,6 @@
[DOMTokenList interface object length]
expected: FAIL
- [Document interface: attribute inputEncoding]
- expected: FAIL
-
- [Document interface: xmlDoc must inherit property "inputEncoding" with the proper type (6)]
- expected: FAIL
-
[Document interface: xmlDoc must inherit property "createAttributeNS" with the proper type (22)]
expected: FAIL
diff --git a/tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini b/tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini
index 0921f568b5a..2c72acd4796 100644
--- a/tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini
+++ b/tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini
@@ -45,240 +45,3 @@
[createDocument test 153: "foo:","xmlns:foo",null,"NAMESPACE_ERR"]
expected: FAIL
- [createDocument test 0: metadata for null,undefined,null]
- expected: FAIL
-
- [createDocument test 1: metadata for null,"foo",null]
- expected: FAIL
-
- [createDocument test 3: metadata for null,"f1oo",null]
- expected: FAIL
-
- [createDocument test 4: metadata for null,"foo1",null]
- expected: FAIL
-
- [createDocument test 22: metadata for null,"xml",null]
- expected: FAIL
-
- [createDocument test 24: metadata for null,"xmlfoo",null]
- expected: FAIL
-
- [createDocument test 32: metadata for undefined,undefined,null]
- expected: FAIL
-
- [createDocument test 33: metadata for undefined,"foo",null]
- expected: FAIL
-
- [createDocument test 35: metadata for undefined,"f1oo",null]
- expected: FAIL
-
- [createDocument test 36: metadata for undefined,"foo1",null]
- expected: FAIL
-
- [createDocument test 40: metadata for undefined,"xml",null]
- expected: FAIL
-
- [createDocument test 42: metadata for undefined,"xmlfoo",null]
- expected: FAIL
-
- [createDocument test 46: metadata for "http://example.com/","foo",null]
- expected: FAIL
-
- [createDocument test 48: metadata for "http://example.com/","f1oo",null]
- expected: FAIL
-
- [createDocument test 49: metadata for "http://example.com/","foo1",null]
- expected: FAIL
-
- [createDocument test 51: metadata for "http://example.com/","f:oo",null]
- expected: FAIL
-
- [createDocument test 53: metadata for "http://example.com/","_:_",null]
- expected: FAIL
-
- [createDocument test 54: metadata for "http://example.com/","_:h0",null]
- expected: FAIL
-
- [createDocument test 55: metadata for "http://example.com/","_:test",null]
- expected: FAIL
-
- [createDocument test 56: metadata for "http://example.com/","l_:_",null]
- expected: FAIL
-
- [createDocument test 57: metadata for "http://example.com/","ns:_0",null]
- expected: FAIL
-
- [createDocument test 58: metadata for "http://example.com/","ns:a0",null]
- expected: FAIL
-
- [createDocument test 59: metadata for "http://example.com/","ns0:test",null]
- expected: FAIL
-
- [createDocument test 60: metadata for "http://example.com/","a.b:c",null]
- expected: FAIL
-
- [createDocument test 61: metadata for "http://example.com/","a-b:c",null]
- expected: FAIL
-
- [createDocument test 62: metadata for "http://example.com/","a-b:c",null]
- expected: FAIL
-
- [createDocument test 63: metadata for "http://example.com/","xml",null]
- expected: FAIL
-
- [createDocument test 65: metadata for "http://example.com/","XMLNS",null]
- expected: FAIL
-
- [createDocument test 66: metadata for "http://example.com/","xmlfoo",null]
- expected: FAIL
-
- [createDocument test 68: metadata for "http://example.com/","XML:foo",null]
- expected: FAIL
-
- [createDocument test 70: metadata for "http://example.com/","XMLNS:foo",null]
- expected: FAIL
-
- [createDocument test 71: metadata for "http://example.com/","xmlfoo:bar",null]
- expected: FAIL
-
- [createDocument test 100: metadata for "/","foo",null]
- expected: FAIL
-
- [createDocument test 102: metadata for "/","f1oo",null]
- expected: FAIL
-
- [createDocument test 103: metadata for "/","foo1",null]
- expected: FAIL
-
- [createDocument test 105: metadata for "/","f:oo",null]
- expected: FAIL
-
- [createDocument test 107: metadata for "/","xml",null]
- expected: FAIL
-
- [createDocument test 109: metadata for "/","xmlfoo",null]
- expected: FAIL
-
- [createDocument test 112: metadata for "/","xmlfoo:bar",null]
- expected: FAIL
-
- [createDocument test 113: metadata for "http://www.w3.org/XML/1998/namespace","foo",null]
- expected: FAIL
-
- [createDocument test 115: metadata for "http://www.w3.org/XML/1998/namespace","f1oo",null]
- expected: FAIL
-
- [createDocument test 116: metadata for "http://www.w3.org/XML/1998/namespace","foo1",null]
- expected: FAIL
-
- [createDocument test 118: metadata for "http://www.w3.org/XML/1998/namespace","f:oo",null]
- expected: FAIL
-
- [createDocument test 120: metadata for "http://www.w3.org/XML/1998/namespace","xml",null]
- expected: FAIL
-
- [createDocument test 122: metadata for "http://www.w3.org/XML/1998/namespace","xmlfoo",null]
- expected: FAIL
-
- [createDocument test 123: metadata for "http://www.w3.org/XML/1998/namespace","xml:foo",null]
- expected: FAIL
-
- [createDocument test 125: metadata for "http://www.w3.org/XML/1998/namespace","xmlfoo:bar",null]
- expected: FAIL
-
- [createDocument test 136: metadata for "http://www.w3.org/2000/xmlns/","xmlns",null]
- expected: FAIL
-
- [createDocument test 139: metadata for "http://www.w3.org/2000/xmlns/","xmlns:foo",null]
- expected: FAIL
-
- [createDocument test 142: metadata for "foo:","foo",null]
- expected: FAIL
-
- [createDocument test 144: metadata for "foo:","f1oo",null]
- expected: FAIL
-
- [createDocument test 145: metadata for "foo:","foo1",null]
- expected: FAIL
-
- [createDocument test 147: metadata for "foo:","f:oo",null]
- expected: FAIL
-
- [createDocument test 149: metadata for "foo:","xml",null]
- expected: FAIL
-
- [createDocument test 151: metadata for "foo:","xmlfoo",null]
- expected: FAIL
-
- [createDocument test 154: metadata for "foo:","xmlfoo:bar",null]
- expected: FAIL
-
- [createDocument test 156: metadata for null,null,null]
- expected: FAIL
-
- [createDocument test 157: metadata for null,"",null]
- expected: FAIL
-
- [createDocument test 158: metadata for undefined,null,undefined]
- expected: FAIL
-
- [createDocument test 159: metadata for undefined,undefined,undefined]
- expected: FAIL
-
- [createDocument test 160: metadata for undefined,"",undefined]
- expected: FAIL
-
- [createDocument test 161: metadata for "http://example.com/",null,null]
- expected: FAIL
-
- [createDocument test 162: metadata for "http://example.com/","",null]
- expected: FAIL
-
- [createDocument test 163: metadata for "/",null,null]
- expected: FAIL
-
- [createDocument test 164: metadata for "/","",null]
- expected: FAIL
-
- [createDocument test 165: metadata for "http://www.w3.org/XML/1998/namespace",null,null]
- expected: FAIL
-
- [createDocument test 166: metadata for "http://www.w3.org/XML/1998/namespace","",null]
- expected: FAIL
-
- [createDocument test 167: metadata for "http://www.w3.org/2000/xmlns/",null,null]
- expected: FAIL
-
- [createDocument test 168: metadata for "http://www.w3.org/2000/xmlns/","",null]
- expected: FAIL
-
- [createDocument test 169: metadata for "foo:",null,null]
- expected: FAIL
-
- [createDocument test 170: metadata for "foo:","",null]
- expected: FAIL
-
- [createDocument test 171: metadata for null,null,DocumentType node]
- expected: FAIL
-
- [createDocument test 172: metadata for null,null,DocumentType node]
- expected: FAIL
-
- [createDocument test 173: metadata for null,null,DocumentType node]
- expected: FAIL
-
- [createDocument test 174: metadata for null,null,DocumentType node]
- expected: FAIL
-
- [createDocument test 175: metadata for null,null,DocumentType node]
- expected: FAIL
-
- [createDocument test 176: metadata for null,"foo",DocumentType node]
- expected: FAIL
-
- [createDocument test 177: metadata for "foo",null,DocumentType node]
- expected: FAIL
-
- [createDocument test 178: metadata for "foo","bar",DocumentType node]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini b/tests/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini
index de9267b6611..62f37b72e10 100644
--- a/tests/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini
+++ b/tests/wpt/metadata/dom/nodes/DOMImplementation-createHTMLDocument.html.ini
@@ -6,6 +6,3 @@
[createHTMLDocument test 2: undefined,undefined,""]
expected: FAIL
- [createHTMLDocument(): metadata]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/dom/nodes/Document-constructor.html.ini b/tests/wpt/metadata/dom/nodes/Document-constructor.html.ini
index 43fe00c22a6..fe66c38792e 100644
--- a/tests/wpt/metadata/dom/nodes/Document-constructor.html.ini
+++ b/tests/wpt/metadata/dom/nodes/Document-constructor.html.ini
@@ -6,6 +6,3 @@
[new Document(): URL parsing]
expected: FAIL
- [new Document(): metadata]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/dom/nodes/Node-properties.html.ini b/tests/wpt/metadata/dom/nodes/Node-properties.html.ini
index 819269300ba..9ed603101f1 100644
--- a/tests/wpt/metadata/dom/nodes/Node-properties.html.ini
+++ b/tests/wpt/metadata/dom/nodes/Node-properties.html.ini
@@ -219,12 +219,3 @@
[paras[4\].firstElementChild]
expected: FAIL
- [document.inputEncoding]
- expected: FAIL
-
- [foreignDoc.inputEncoding]
- expected: FAIL
-
- [xmlDoc.inputEncoding]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 566546e4cb7..f91ae99c403 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -9429,9 +9429,6 @@
[Document interface: iframe.contentDocument must inherit property "onwaiting" with the proper type (155)]
expected: FAIL
- [Document interface: document.implementation.createDocument(null, "", null) must inherit property "inputEncoding" with the proper type (6)]
- expected: FAIL
-
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "createAttributeNS" with the proper type (22)]
expected: FAIL