From e21d7c4218d79923858ea978cb55680f39724782 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 4 Apr 2013 12:02:50 -0400 Subject: [PATCH] Backed out changesets 715fce49a07b and abbc05319449 (bug 851916) for B2G mochitest-2 orange. --HG-- rename : dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/ChildNode-remove.js => dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_ChildNode-remove.js --- content/base/src/DOMImplementation.cpp | 34 ++- content/base/src/DOMImplementation.h | 2 +- .../tests/approved/test_interfaces.html.json | 142 +++------- .../tests/submissions/Ms2ger/Makefile.in | 7 + .../test_CharacterData-remove.html.json | 15 +- ...mplementation-createHTMLDocument.html.json | 3 + ...st_Document-getElementsByTagName.html.json | 5 +- .../Ms2ger/test_DocumentType-remove.html.json | 5 +- .../Ms2ger/test_Element-remove.html.json | 5 +- .../Ms2ger/test_Range-attributes.html.json | 3 + ...st_Range-commonAncestorContainer.html.json | 3 + .../Ms2ger/test_Range-comparePoint.html.json | 3 + .../Ms2ger/test_Range-detach.html.json | 3 + dom/imptests/idlharness.js | 115 ++------ dom/imptests/testharness.js | 255 +++--------------- dom/imptests/webapps.mozbuild | 2 +- .../tests/approved/test_interfaces.html | 227 +++++++++------- .../tests/submissions/Ms2ger/Makefile.in | 4 +- ...ode-remove.js => test_ChildNode-remove.js} | 0 ...test_DOMImplementation-createDocument.html | 93 +++---- .../Ms2ger/test_Document-createElement.html | 19 +- .../Ms2ger/test_Document-createEvent.html | 2 +- .../test_Document-createTreeWalker.html | 42 --- .../test_Document-getElementsByTagName.html | 61 +---- .../submissions/Ms2ger/test_Event-type.html | 22 -- .../Ms2ger/test_Node-isEqualNode.xhtml | 1 - .../Ms2ger/test_NodeFilter-constants.html | 1 + .../Ms2ger/test_Range-attributes.html | 10 +- .../test_Range-commonAncestorContainer.html | 4 +- .../Ms2ger/test_Range-comparePoint.html | 2 +- .../submissions/Ms2ger/test_Range-detach.html | 2 +- .../tests/submissions/Ms2ger/Makefile.in | 1 - .../Ms2ger/test_FormData-append.html | 14 - dom/webidl/DOMImplementation.webidl | 2 +- 34 files changed, 336 insertions(+), 773 deletions(-) create mode 100644 dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createHTMLDocument.html.json create mode 100644 dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-attributes.html.json create mode 100644 dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html.json create mode 100644 dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html.json create mode 100644 dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html.json rename dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/{ChildNode-remove.js => test_ChildNode-remove.js} (100%) delete mode 100644 dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createTreeWalker.html delete mode 100644 dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Event-type.html delete mode 100644 dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_FormData-append.html diff --git a/content/base/src/DOMImplementation.cpp b/content/base/src/DOMImplementation.cpp index 52c73e8a142..fb12d8d4a98 100644 --- a/content/base/src/DOMImplementation.cpp +++ b/content/base/src/DOMImplementation.cpp @@ -211,22 +211,20 @@ DOMImplementation::CreateHTMLDocument(const nsAString& aTitle, rv = root->AppendChildTo(head, false); NS_ENSURE_SUCCESS(rv, rv); - if (!DOMStringIsNull(aTitle)) { - nsCOMPtr title; - rv = doc->CreateElem(NS_LITERAL_STRING("title"), nullptr, - kNameSpaceID_XHTML, getter_AddRefs(title)); - NS_ENSURE_SUCCESS(rv, rv); - rv = head->AppendChildTo(title, false); - NS_ENSURE_SUCCESS(rv, rv); + nsCOMPtr title; + rv = doc->CreateElem(NS_LITERAL_STRING("title"), nullptr, kNameSpaceID_XHTML, + getter_AddRefs(title)); + NS_ENSURE_SUCCESS(rv, rv); + rv = head->AppendChildTo(title, false); + NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr titleText; - rv = NS_NewTextNode(getter_AddRefs(titleText), doc->NodeInfoManager()); - NS_ENSURE_SUCCESS(rv, rv); - rv = titleText->SetText(aTitle, false); - NS_ENSURE_SUCCESS(rv, rv); - rv = title->AppendChildTo(titleText, false); - NS_ENSURE_SUCCESS(rv, rv); - } + nsCOMPtr titleText; + rv = NS_NewTextNode(getter_AddRefs(titleText), doc->NodeInfoManager()); + NS_ENSURE_SUCCESS(rv, rv); + rv = titleText->SetText(aTitle, false); + NS_ENSURE_SUCCESS(rv, rv); + rv = title->AppendChildTo(titleText, false); + NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr body; rv = doc->CreateElem(NS_LITERAL_STRING("body"), nullptr, kNameSpaceID_XHTML, @@ -243,14 +241,12 @@ DOMImplementation::CreateHTMLDocument(const nsAString& aTitle, } already_AddRefed -DOMImplementation::CreateHTMLDocument(const Optional& aTitle, +DOMImplementation::CreateHTMLDocument(const nsAString& aTitle, ErrorResult& aRv) { nsCOMPtr document; nsCOMPtr domDocument; - aRv = CreateHTMLDocument(aTitle.WasPassed() ? aTitle.Value() - : NullString(), - getter_AddRefs(document), + aRv = CreateHTMLDocument(aTitle, getter_AddRefs(document), getter_AddRefs(domDocument)); return document.forget(); } diff --git a/content/base/src/DOMImplementation.h b/content/base/src/DOMImplementation.h index bf6b4ab3c6f..28b6673dd31 100644 --- a/content/base/src/DOMImplementation.h +++ b/content/base/src/DOMImplementation.h @@ -73,7 +73,7 @@ public: ErrorResult& aRv); already_AddRefed - CreateHTMLDocument(const Optional& aTitle, ErrorResult& aRv); + CreateHTMLDocument(const nsAString& aTitle, ErrorResult& aRv); private: nsresult CreateDocument(const nsAString& aNamespaceURI, diff --git a/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json b/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json index 6961d4a9eba..ec21e48426d 100644 --- a/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json +++ b/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json @@ -30,129 +30,67 @@ "DOMException exception: constant DATA_CLONE_ERR on exception interface prototype object": true, "DOMException exception: field code on exception interface prototype object": true, "DOMError interface: existence and properties of interface object": true, - "DOMError interface constructor": true, "DOMError interface: existence and properties of interface prototype object": true, "DOMError interface: existence and properties of interface prototype object's \"constructor\" property": true, "DOMError interface: attribute name": true, - "Event interface: document.createEvent(\"Event\") must have own property \"isTrusted\"": true, - "Event interface: document.createEvent(\"Event\") must inherit property \"timeStamp\" with the proper type (15)": true, - "Event interface: new Event(\"foo\") must have own property \"isTrusted\"": true, - "Event interface: new Event(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": true, + "Event interface: document.createEvent(\"Event\") must inherit property \"timeStamp\" with the proper type (14)": true, + "Event interface: new Event(\"foo\") must inherit property \"timeStamp\" with the proper type (14)": true, "CustomEvent interface: existence and properties of interface object": true, "CustomEvent interface constructor": true, "CustomEvent interface: existence and properties of interface prototype object": true, "CustomEvent interface: existence and properties of interface prototype object's \"constructor\" property": true, "CustomEvent interface: attribute detail": true, "Stringification of new CustomEvent(\"foo\")": "debug", - "CustomEvent interface: calling initCustomEvent(DOMString,boolean,boolean,any) on new CustomEvent(\"foo\") with too few arguments must throw TypeError": true, - "Event interface: new CustomEvent(\"foo\") must have own property \"isTrusted\"": true, - "Event interface: new CustomEvent(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": true, + "Event interface: new CustomEvent(\"foo\") must inherit property \"timeStamp\" with the proper type (14)": true, "Event interface: calling initEvent(DOMString,boolean,boolean) on new CustomEvent(\"foo\") with too few arguments must throw TypeError": true, - "MutationObserver interface: operation observe(Node,MutationObserverInit)": true, - "Document interface: attribute children": true, - "Document interface: attribute firstElementChild": true, - "Document interface: attribute lastElementChild": true, - "Document interface: attribute childElementCount": true, - "Document interface: operation prepend(union)": true, - "Document interface: operation append(union)": true, - "Document interface: xmlDoc must inherit property \"children\" with the proper type (24)": true, - "Document interface: xmlDoc must inherit property \"firstElementChild\" with the proper type (25)": true, - "Document interface: xmlDoc must inherit property \"lastElementChild\" with the proper type (26)": true, - "Document interface: xmlDoc must inherit property \"childElementCount\" with the proper type (27)": true, - "Document interface: xmlDoc must inherit property \"prepend\" with the proper type (28)": true, - "Document interface: calling prepend(union) on xmlDoc with too few arguments must throw TypeError": true, - "Document interface: xmlDoc must inherit property \"append\" with the proper type (29)": true, - "Document interface: calling append(union) on xmlDoc with too few arguments must throw TypeError": true, - "DocumentFragment interface: attribute children": true, - "DocumentFragment interface: attribute firstElementChild": true, - "DocumentFragment interface: attribute lastElementChild": true, - "DocumentFragment interface: attribute childElementCount": true, - "DocumentFragment interface: operation prepend(union)": true, - "DocumentFragment interface: operation append(union)": true, - "DocumentFragment interface: document.createDocumentFragment() must inherit property \"children\" with the proper type (0)": true, - "DocumentFragment interface: document.createDocumentFragment() must inherit property \"firstElementChild\" with the proper type (1)": true, - "DocumentFragment interface: document.createDocumentFragment() must inherit property \"lastElementChild\" with the proper type (2)": true, - "DocumentFragment interface: document.createDocumentFragment() must inherit property \"childElementCount\" with the proper type (3)": true, - "DocumentFragment interface: document.createDocumentFragment() must inherit property \"prepend\" with the proper type (4)": true, - "DocumentFragment interface: calling prepend(union) on document.createDocumentFragment() with too few arguments must throw TypeError": true, - "DocumentFragment interface: document.createDocumentFragment() must inherit property \"append\" with the proper type (5)": true, - "DocumentFragment interface: calling append(union) on document.createDocumentFragment() with too few arguments must throw TypeError": true, - "DocumentType interface: attribute previousElementSibling": true, - "DocumentType interface: attribute nextElementSibling": true, - "DocumentType interface: operation before(union)": true, - "DocumentType interface: operation after(union)": true, - "DocumentType interface: operation replace(union)": true, + "EventListener interface: existence and properties of interface object": true, + "EventListener interface: existence and properties of interface prototype object": true, + "EventListener interface: existence and properties of interface prototype object's \"constructor\" property": true, + "EventListener interface: operation handleEvent(Event)": true, + "MutationCallback interface: existence and properties of interface object": true, + "MutationCallback interface: existence and properties of interface prototype object": true, + "MutationCallback interface: existence and properties of interface prototype object's \"constructor\" property": true, + "MutationCallback interface: operation handleEvent(MutationRecord,MutationObserver)": true, "DocumentType interface: operation remove()": true, - "DocumentType interface: document.doctype must inherit property \"previousElementSibling\" with the proper type (3)": true, - "DocumentType interface: document.doctype must inherit property \"nextElementSibling\" with the proper type (4)": true, - "DocumentType interface: document.doctype must inherit property \"before\" with the proper type (5)": true, - "DocumentType interface: calling before(union) on document.doctype with too few arguments must throw TypeError": true, - "DocumentType interface: document.doctype must inherit property \"after\" with the proper type (6)": true, - "DocumentType interface: calling after(union) on document.doctype with too few arguments must throw TypeError": true, - "DocumentType interface: document.doctype must inherit property \"replace\" with the proper type (7)": true, - "DocumentType interface: calling replace(union) on document.doctype with too few arguments must throw TypeError": true, - "DocumentType interface: document.doctype must inherit property \"remove\" with the proper type (8)": true, + "DocumentType interface: document.doctype must inherit property \"remove\" with the proper type (3)": true, "Element interface: attribute namespaceURI": true, "Element interface: attribute prefix": true, "Element interface: attribute localName": true, "Element interface: attribute className": true, - "Element interface: operation prepend(union)": true, - "Element interface: operation append(union)": true, - "Element interface: operation before(union)": true, - "Element interface: operation after(union)": true, - "Element interface: operation replace(union)": true, "Element interface: operation remove()": true, "Element interface: element must inherit property \"className\" with the proper type (5)": true, - "Element interface: element must inherit property \"prepend\" with the proper type (23)": true, - "Element interface: calling prepend(union) on element with too few arguments must throw TypeError": true, - "Element interface: element must inherit property \"append\" with the proper type (24)": true, - "Element interface: calling append(union) on element with too few arguments must throw TypeError": true, - "Element interface: element must inherit property \"before\" with the proper type (27)": true, - "Element interface: calling before(union) on element with too few arguments must throw TypeError": true, - "Element interface: element must inherit property \"after\" with the proper type (28)": true, - "Element interface: calling after(union) on element with too few arguments must throw TypeError": true, - "Element interface: element must inherit property \"replace\" with the proper type (29)": true, - "Element interface: calling replace(union) on element with too few arguments must throw TypeError": true, - "Element interface: element must inherit property \"remove\" with the proper type (30)": true, + "Element interface: element must inherit property \"remove\" with the proper type (25)": true, "Attr interface: existence and properties of interface object": true, "Attr interface: existence and properties of interface prototype object": true, "Attr interface: existence and properties of interface prototype object's \"constructor\" property": true, - "Attr interface: attribute value": true, "Attr interface: attribute name": true, + "Attr interface: attribute value": true, "Stringification of document.querySelector(\"[id]\").attributes[0]": "debug", - "CharacterData interface: attribute previousElementSibling": true, - "CharacterData interface: attribute nextElementSibling": true, - "CharacterData interface: operation before(union)": true, - "CharacterData interface: operation after(union)": true, - "CharacterData interface: operation replace(union)": true, "CharacterData interface: operation remove()": true, - "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"previousElementSibling\" with the proper type (7)": true, - "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"nextElementSibling\" with the proper type (8)": true, - "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"before\" with the proper type (9)": true, - "CharacterData interface: calling before(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true, - "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"after\" with the proper type (10)": true, - "CharacterData interface: calling after(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true, - "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"replace\" with the proper type (11)": true, - "CharacterData interface: calling replace(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true, - "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"remove\" with the proper type (12)": true, - "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"previousElementSibling\" with the proper type (7)": true, - "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"nextElementSibling\" with the proper type (8)": true, - "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"before\" with the proper type (9)": true, - "CharacterData interface: calling before(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true, - "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"after\" with the proper type (10)": true, - "CharacterData interface: calling after(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true, - "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"replace\" with the proper type (11)": true, - "CharacterData interface: calling replace(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true, - "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"remove\" with the proper type (12)": true, - "CharacterData interface: document.createComment(\"abc\") must inherit property \"previousElementSibling\" with the proper type (7)": true, - "CharacterData interface: document.createComment(\"abc\") must inherit property \"nextElementSibling\" with the proper type (8)": true, - "CharacterData interface: document.createComment(\"abc\") must inherit property \"before\" with the proper type (9)": true, - "CharacterData interface: calling before(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true, - "CharacterData interface: document.createComment(\"abc\") must inherit property \"after\" with the proper type (10)": true, - "CharacterData interface: calling after(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true, - "CharacterData interface: document.createComment(\"abc\") must inherit property \"replace\" with the proper type (11)": true, - "CharacterData interface: calling replace(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true, - "CharacterData interface: document.createComment(\"abc\") must inherit property \"remove\" with the proper type (12)": true, - "NodeFilter interface: existence and properties of interface object": true, - "NodeList interface: existence and properties of interface prototype object": true + "CharacterData interface: document.createTextNode(\"abc\") must inherit property \"remove\" with the proper type (7)": true, + "CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"remove\" with the proper type (7)": true, + "CharacterData interface: document.createComment(\"abc\") must inherit property \"remove\" with the proper type (7)": true, + "NodeFilter interface: existence and properties of interface prototype object": true, + "NodeFilter interface: existence and properties of interface prototype object's \"constructor\" property": true, + "NodeFilter interface: constant FILTER_ACCEPT on interface prototype object": true, + "NodeFilter interface: constant FILTER_REJECT on interface prototype object": true, + "NodeFilter interface: constant FILTER_SKIP on interface prototype object": true, + "NodeFilter interface: constant SHOW_ALL on interface prototype object": true, + "NodeFilter interface: constant SHOW_ELEMENT on interface prototype object": true, + "NodeFilter interface: constant SHOW_ATTRIBUTE on interface prototype object": true, + "NodeFilter interface: constant SHOW_TEXT on interface prototype object": true, + "NodeFilter interface: constant SHOW_CDATA_SECTION on interface prototype object": true, + "NodeFilter interface: constant SHOW_ENTITY_REFERENCE on interface prototype object": true, + "NodeFilter interface: constant SHOW_ENTITY on interface prototype object": true, + "NodeFilter interface: constant SHOW_PROCESSING_INSTRUCTION on interface prototype object": true, + "NodeFilter interface: constant SHOW_COMMENT on interface prototype object": true, + "NodeFilter interface: constant SHOW_DOCUMENT on interface prototype object": true, + "NodeFilter interface: constant SHOW_DOCUMENT_TYPE on interface prototype object": true, + "NodeFilter interface: constant SHOW_DOCUMENT_FRAGMENT on interface prototype object": true, + "NodeFilter interface: constant SHOW_NOTATION on interface prototype object": true, + "NodeFilter interface: operation acceptNode(Node)": true, + "DOMStringList interface: existence and properties of interface object": true, + "DOMStringList interface: existence and properties of interface prototype object": true, + "DOMStringList interface: existence and properties of interface prototype object's \"constructor\" property": true, + "DOMStringList interface: attribute length": true } diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in index c5406560597..3bb1d87b54a 100644 --- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in @@ -11,11 +11,18 @@ include $(DEPTH)/config/autoconf.mk MOCHITEST_FILES := \ test_CharacterData-remove.html.json \ + test_DOMImplementation-createDocument.html.json \ + test_DOMImplementation-createHTMLDocument.html.json \ test_Document-createElementNS.html.json \ test_Document-getElementsByTagName.html.json \ test_DocumentType-remove.html.json \ test_Element-remove.html.json \ test_Node-isEqualNode.xhtml.json \ + test_NodeFilter-constants.html.json \ + test_Range-attributes.html.json \ + test_Range-commonAncestorContainer.html.json \ + test_Range-comparePoint.html.json \ + test_Range-detach.html.json \ test_attributes.html.json \ test_case.html.json \ test_historical.html.json \ diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-remove.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-remove.html.json index cc52c316847..6051ea02cd6 100644 --- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-remove.html.json +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_CharacterData-remove.html.json @@ -1,14 +1,5 @@ { - "text should support remove()": true, - "remove() should work if text doesn't have a parent": true, - "remove() should work if text does have a parent": true, - "remove() should work if text does have a parent and siblings": true, - "comment should support remove()": true, - "remove() should work if comment doesn't have a parent": true, - "remove() should work if comment does have a parent": true, - "remove() should work if comment does have a parent and siblings": true, - "PI should support remove()": true, - "remove() should work if PI doesn't have a parent": true, - "remove() should work if PI does have a parent": true, - "remove() should work if PI does have a parent and siblings": true + "CharacterData.remove": true, + "CharacterData.remove 1": true, + "CharacterData.remove 2": true } diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createHTMLDocument.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createHTMLDocument.html.json new file mode 100644 index 00000000000..93ba2a326ab --- /dev/null +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createHTMLDocument.html.json @@ -0,0 +1,3 @@ +{ + "Missing title argument": true +} diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html.json index 53be448185a..d933e3c7cce 100644 --- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html.json +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html.json @@ -1,5 +1,4 @@ { - "Shouldn't be able to set unsigned properties on a HTMLCollection (strict mode)": true, - "Document.getElementsByTagName 1": true, - "Document.getElementsByTagName 2": true + "Document.getElementsByTagName 2": true, + "Document.getElementsByTagName 3": true } diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DocumentType-remove.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DocumentType-remove.html.json index 01c853f2f2a..39a5c3433e3 100644 --- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DocumentType-remove.html.json +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_DocumentType-remove.html.json @@ -1,6 +1,3 @@ { - "doctype should support remove()": true, - "remove() should work if doctype doesn't have a parent": true, - "remove() should work if doctype does have a parent": true, - "remove() should work if doctype does have a parent and siblings": true + "DocumentType.remove": true } diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-remove.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-remove.html.json index fa30f6dfa77..8a6b528fb36 100644 --- a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-remove.html.json +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Element-remove.html.json @@ -1,6 +1,3 @@ { - "element should support remove()": true, - "remove() should work if element doesn't have a parent": true, - "remove() should work if element does have a parent": true, - "remove() should work if element does have a parent and siblings": true + "Element.remove": true } diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-attributes.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-attributes.html.json new file mode 100644 index 00000000000..5e4e2083994 --- /dev/null +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-attributes.html.json @@ -0,0 +1,3 @@ +{ + "Range attributes": true +} diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html.json new file mode 100644 index 00000000000..a8609e51b12 --- /dev/null +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html.json @@ -0,0 +1,3 @@ +{ + "Detached Range": true +} diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html.json new file mode 100644 index 00000000000..d7d8b443a70 --- /dev/null +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html.json @@ -0,0 +1,3 @@ +{ + "Range.comparePoint": true +} diff --git a/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html.json b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html.json new file mode 100644 index 00000000000..61c49bd75bc --- /dev/null +++ b/dom/imptests/failures/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html.json @@ -0,0 +1,3 @@ +{ + "Range.detach": true +} diff --git a/dom/imptests/idlharness.js b/dom/imptests/idlharness.js index 312d35a88af..b627b40f8fc 100644 --- a/dom/imptests/idlharness.js +++ b/dom/imptests/idlharness.js @@ -303,10 +303,6 @@ IdlArray.prototype.internal_add_idls = function(parsed_idls) // TODO break; - case "callback": - // TODO - break; - default: throw parsed_idl.name + ": " + parsed_idl.type + " not yet supported"; } @@ -1033,42 +1029,18 @@ IdlException.prototype.test_object = function(desc) /// IdlInterface /// function IdlInterface(obj) { IdlExceptionOrInterface.call(this, obj); } IdlInterface.prototype = Object.create(IdlExceptionOrInterface.prototype); -IdlInterface.prototype.is_callback = function() -//@{ -{ - return this.has_extended_attribute("Callback"); -} -//@} - -IdlInterface.prototype.has_constants = function() -//@{ -{ - return this.members.some(function(member) { - return member.type === "const"; - }); -} -//@} - IdlInterface.prototype.test_self = function() //@{ { test(function() { - // This function tests WebIDL as of 2012-11-28. - - // "For every interface that: - // * is a callback interface that has constants declared on it, or - // * is a non-callback interface that is not declared with the - // [NoInterfaceObject] extended attribute, - // a corresponding property MUST exist on the ECMAScript global object. - // The name of the property is the identifier of the interface, and its - // value is an object called the interface object. - // The property has the attributes { [[Writable]]: true, - // [[Enumerable]]: false, [[Configurable]]: true }." - if (this.is_callback() && !this.has_constants()) { - return; - } - + // "For every interface that is not declared with the + // [NoInterfaceObject] extended attribute, a corresponding property + // must exist on the interface’s relevant namespace object. The name of + // the property is the identifier of the interface, and its value is an + // object called the interface object. The property has the attributes + // { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true + // }." // TODO: Should we test here that the property is actually writable // etc., or trust getOwnPropertyDescriptor? assert_own_property(window, this.name, @@ -1080,53 +1052,43 @@ IdlInterface.prototype.test_self = function() assert_false(desc.enumerable, "window's property " + format_value(this.name) + " is enumerable"); assert_true(desc.configurable, "window's property " + format_value(this.name) + " is not configurable"); - if (this.is_callback()) { - // "The internal [[Prototype]] property of an interface object for - // a callback interface MUST be the Object.prototype object." - assert_equals(Object.getPrototypeOf(window[this.name]), Object.prototype, - "prototype of window's property " + format_value(this.name) + " is not Object.prototype"); - - return; - } - - // "The interface object for a given non-callback interface is a - // function object." + // "Interface objects are always function objects." // "If an object is defined to be a function object, then it has // characteristics as follows:" - - // "* Its [[Prototype]] internal property is the Function prototype - // object." + // "Its [[Prototype]] internal property is the Function prototype + // object." + // Note: This doesn't match browsers as of December 2011, see + // http://www.w3.org/Bugs/Public/show_bug.cgi?id=14813 assert_equals(Object.getPrototypeOf(window[this.name]), Function.prototype, "prototype of window's property " + format_value(this.name) + " is not Function.prototype"); - - // "* Its [[Get]] internal property is set as described in ECMA-262 - // section 15.3.5.4." + // "Its [[Get]] internal property is set as described in ECMA-262 + // section 15.3.5.4." // Not much to test for this. - - // "* Its [[Construct]] internal property is set as described in - // ECMA-262 section 13.2.2." + // "Its [[Construct]] internal property is set as described in ECMA-262 + // section 13.2.2." // Tested below if no constructor is defined. TODO: test constructors // if defined. - - // "* Its [[HasInstance]] internal property is set as described in - // ECMA-262 section 15.3.5.3, unless otherwise specified." + // "Its [[HasInstance]] internal property is set as described in + // ECMA-262 section 15.3.5.3, unless otherwise specified." // TODO - - // "* Its [[NativeBrand]] internal property is “Function”." + // "Its [[Class]] internal property is “Function”." // String() returns something implementation-dependent, because it calls // Function#toString. assert_class_string(window[this.name], "Function", "class string of " + this.name); - if (!this.has_extended_attribute("Constructor")) { + if (!this.has_extended_attribute("Constructor")) + { // "The internal [[Call]] method of the interface object behaves as // follows . . . // // "If I was not declared with a [Constructor] extended attribute, // then throw a TypeError." - assert_throws(new TypeError(), function() { + assert_throws(new TypeError(), function() + { window[this.name](); }.bind(this), "interface object didn't throw TypeError when called as a function"); - assert_throws(new TypeError(), function() { + assert_throws(new TypeError(), function() + { new window[this.name](); }.bind(this), "interface object didn't throw TypeError when called as a constructor"); } @@ -1176,12 +1138,6 @@ IdlInterface.prototype.test_self = function() assert_own_property(window, this.name, "window does not have own property " + format_value(this.name)); - if (this.has_extended_attribute("Callback")) { - assert_false("prototype" in window[this.name], - this.name + ' should not have a "prototype" property'); - return; - } - // "The interface object must also have a property named “prototype” // with attributes { [[Writable]]: false, [[Enumerable]]: false, // [[Configurable]]: false } whose value is an object called the @@ -1263,13 +1219,6 @@ IdlInterface.prototype.test_self = function() { assert_own_property(window, this.name, "window does not have own property " + format_value(this.name)); - - if (this.has_extended_attribute("Callback")) { - assert_false("prototype" in window[this.name], - this.name + ' should not have a "prototype" property'); - return; - } - assert_own_property(window[this.name], "prototype", 'interface "' + this.name + '" does not have own property "prototype"'); @@ -1333,13 +1282,6 @@ IdlInterface.prototype.test_members = function() { assert_own_property(window, this.name, "window does not have own property " + format_value(this.name)); - - if (this.has_extended_attribute("Callback")) { - assert_false("prototype" in window[this.name], - this.name + ' should not have a "prototype" property'); - return; - } - assert_own_property(window[this.name], "prototype", 'interface "' + this.name + '" does not have own property "prototype"'); @@ -1389,13 +1331,6 @@ IdlInterface.prototype.test_members = function() { assert_own_property(window, this.name, "window does not have own property " + format_value(this.name)); - - if (this.has_extended_attribute("Callback")) { - assert_false("prototype" in window[this.name], - this.name + ' should not have a "prototype" property'); - return; - } - assert_own_property(window[this.name], "prototype", 'interface "' + this.name + '" does not have own property "prototype"'); diff --git a/dom/imptests/testharness.js b/dom/imptests/testharness.js index 4489782f40d..4568983dcc8 100644 --- a/dom/imptests/testharness.js +++ b/dom/imptests/testharness.js @@ -71,9 +71,6 @@ policies and contribution forms [3]. * author - Name and contact information for the author of the test in the * format: "Name " or "Name http://contact/url" * - * flags - space separated list of test flags in addition to any present in - * the head metadata - * * == Asynchronous Tests == * * Testing asynchronous features is somewhat more complex since the result of @@ -97,19 +94,6 @@ policies and contribution forms [3]. * * t.done(); * - * As a convenience, async_test can also takes a function as first argument. - * This function is called with the test object as both its `this` object and - * first argument. The above example can be rewritten as: - * - * async_test(function(t) { - * object.some_event = function() { - * t.step(function (){assert_true(true); t.done();}); - * }; - * }, "Simple async test"); - * - * which avoids cluttering the global scope with references to async - * tests instances. - * * The properties argument is identical to that for test(). * * In many cases it is convenient to run a step in response to an event or a @@ -238,7 +222,7 @@ policies and contribution forms [3]. * * In order to collect the results of multiple pages containing tests, the test * harness will, when loaded in a nested browsing context, attempt to call - * certain functions in each ancestor and opener browsing context: + * certain functions in each ancestor browsing context: * * start - start_callback * result - result_callback @@ -247,22 +231,6 @@ policies and contribution forms [3]. * These are given the same arguments as the corresponding internal callbacks * described above. * - * == External API through cross-document messaging == - * - * Where supported, the test harness will also send messages using - * cross-document messaging to each ancestor and opener browsing context. Since - * it uses the wildcard keyword (*), cross-origin communication is enabled and - * script on different origins can collect the results. - * - * This API follows similar conventions as those described above only slightly - * modified to accommodate message event API. Each message is sent by the harness - * is passed a single vanilla object, available as the `data` property of the - * event object. These objects are structures as follows: - * - * start - { type: "start" } - * result - { type: "result", test: Test } - * complete - { type: "complete", tests: [Test, ...], status: TestsStatus } - * * == List of assertions == * * assert_true(actual, description) @@ -408,19 +376,11 @@ policies and contribution forms [3]. } } - function async_test(func, name, properties) + function async_test(name, properties) { - if (typeof func !== "function") { - properties = name; - name = func; - func = null; - } var test_name = name ? name : next_default_name(); properties = properties ? properties : {}; var test_obj = new Test(test_name, properties); - if (func) { - test_obj.step(func, test_obj, test_obj); - } return test_obj; } @@ -692,7 +652,7 @@ policies and contribution forms [3]. } else { - assert(same_value(actual[p], expected[p]), "assert_object_equals", description, + assert(actual[p] === expected[p], "assert_object_equals", description, "property ${p} expected ${expected} got ${actual}", {p:p, expected:expected, actual:actual}); } @@ -723,7 +683,7 @@ policies and contribution forms [3]. "property ${i}, property expected to be $expected but was $actual", {i:i, expected:expected.hasOwnProperty(i) ? "present" : "missing", actual:actual.hasOwnProperty(i) ? "present" : "missing"}); - assert(same_value(expected[i], actual[i]), + assert(expected[i] === actual[i], "assert_array_equals", description, "property ${i}, expected ${expected} but got ${actual}", {i:i, expected:expected[i], actual:actual[i]}); @@ -817,7 +777,7 @@ policies and contribution forms [3]. //Note that this can have side effects in the case where //the property has PutForwards object[property_name] = initial_value + "a"; //XXX use some other value here? - assert(same_value(object[property_name], initial_value), + assert(object[property_name] === initial_value, "assert_readonly", description, "changing property ${p} succeeded", {p:property_name}); @@ -878,7 +838,7 @@ policies and contribution forms [3]. QUOTA_EXCEEDED_ERR: 'QuotaExceededError', TIMEOUT_ERR: 'TimeoutError', INVALID_NODE_TYPE_ERR: 'InvalidNodeTypeError', - DATA_CLONE_ERR: 'DataCloneError' + DATA_CLONE_ERR: 'DataCloneError', }; var name = code in code_name_map ? code_name_map[code] : code; @@ -911,7 +871,7 @@ policies and contribution forms [3]. DataError: 0, TransactionInactiveError: 0, ReadOnlyError: 0, - VersionError: 0 + VersionError: 0, }; if (!(name in name_code_map)) @@ -994,29 +954,13 @@ policies and contribution forms [3]. tests.push(this); } - Test.statuses = { + Test.prototype = { PASS:0, FAIL:1, TIMEOUT:2, NOTRUN:3 }; - Test.prototype = merge({}, Test.statuses); - - Test.prototype.structured_clone = function() - { - if(!this._structured_clone) - { - var msg = this.message; - msg = msg ? String(msg) : msg; - this._structured_clone = merge({ - name:String(this.name), - status:this.status, - message:msg - }, Test.statuses); - } - return this._structured_clone; - }; Test.prototype.step = function(func, this_obj) { @@ -1141,29 +1085,12 @@ policies and contribution forms [3]. this.status = null; this.message = null; } - - TestsStatus.statuses = { + TestsStatus.prototype = { OK:0, ERROR:1, TIMEOUT:2 }; - TestsStatus.prototype = merge({}, TestsStatus.statuses); - - TestsStatus.prototype.structured_clone = function() - { - if(!this._structured_clone) - { - var msg = this.message; - msg = msg ? String(msg) : msg; - this._structured_clone = merge({ - status:this.status, - message:msg - }, TestsStatus.statuses); - } - return this._structured_clone; - }; - function Tests() { this.tests = []; @@ -1305,10 +1232,10 @@ policies and contribution forms [3]. { callback(this_obj.properties); }); - forEach_windows( - function(w, is_same_origin) + forEach(ancestor_windows(), + function(w) { - if(is_same_origin && w.start_callback) + if(w.start_callback) { try { @@ -1322,13 +1249,6 @@ policies and contribution forms [3]. } } } - if (supports_post_message(w) && w !== self) - { - w.postMessage({ - type: "start", - properties: this_obj.properties - }, "*"); - } }); }; @@ -1352,10 +1272,10 @@ policies and contribution forms [3]. callback(test, this_obj); }); - forEach_windows( - function(w, is_same_origin) + forEach(ancestor_windows(), + function(w) { - if(is_same_origin && w.result_callback) + if(w.result_callback) { try { @@ -1368,13 +1288,6 @@ policies and contribution forms [3]. } } } - if (supports_post_message(w) && w !== self) - { - w.postMessage({ - type: "result", - test: test.structured_clone() - }, "*"); - } }); this.processing_callbacks = false; if (this_obj.all_done()) @@ -1405,11 +1318,6 @@ policies and contribution forms [3]. { clearTimeout(this.timeout_id); var this_obj = this; - var tests = map(this_obj.tests, - function(test) - { - return test.structured_clone(); - }); if (this.status.status === null) { this.status.status = this.status.OK; @@ -1421,10 +1329,10 @@ policies and contribution forms [3]. callback(this_obj.tests, this_obj.status); }); - forEach_windows( - function(w, is_same_origin) + forEach(ancestor_windows(), + function(w) { - if(is_same_origin && w.completion_callback) + if(w.completion_callback) { try { @@ -1438,14 +1346,6 @@ policies and contribution forms [3]. } } } - if (supports_post_message(w) && w !== self) - { - w.postMessage({ - type: "complete", - tests: tests, - status: this_obj.status.structured_clone() - }, "*"); - } }); }; @@ -1482,7 +1382,7 @@ policies and contribution forms [3]. */ function Output() { - this.output_document = document; + this.output_document = null; this.output_node = null; this.done_count = 0; this.enabled = settings.output; @@ -2039,107 +1939,22 @@ policies and contribution forms [3]. target[components[components.length - 1]] = object; } - function forEach_windows(callback) { - // Iterate of the the windows [self ... top, opener]. The callback is passed - // two objects, the first one is the windows object itself, the second one - // is a boolean indicating whether or not its on the same origin as the - // current window. - var cache = forEach_windows.result_cache; - if (!cache) { - cache = [[self, true]]; - var w = self; - var i = 0; - var so; - var origins = location.ancestorOrigins; - while (w != w.parent) - { - w = w.parent; - // In WebKit, calls to parent windows' properties that aren't on the same - // origin cause an error message to be displayed in the error console but - // don't throw an exception. This is a deviation from the current HTML5 - // spec. See: https://bugs.webkit.org/show_bug.cgi?id=43504 - // The problem with WebKit's behavior is that it pollutes the error console - // with error messages that can't be caught. - // - // This issue can be mitigated by relying on the (for now) proprietary - // `location.ancestorOrigins` property which returns an ordered list of - // the origins of enclosing windows. See: - // http://trac.webkit.org/changeset/113945. - if(origins) { - so = (location.origin == origins[i]); - } - else - { - so = is_same_origin(w); - } - cache.push([w, so]); - i++; - } - w = window.opener; - if(w) - { - // window.opener isn't included in the `location.ancestorOrigins` prop. - // We'll just have to deal with a simple check and an error msg on WebKit - // browsers in this case. - cache.push([w, is_same_origin(w)]); - } - forEach_windows.result_cache = cache; - } + function ancestor_windows() { + //Get the windows [self ... top] as an array + if ("result_cache" in ancestor_windows) + { + return ancestor_windows.result_cache; + } + var rv = [self]; + var w = self; + while (w != w.parent) + { + w = w.parent; + rv.push(w); + } + ancestor_windows.result_cache = rv; + return rv; + } - forEach(cache, - function(a) - { - callback.apply(null, a); - }); - } - - function is_same_origin(w) { - try { - 'random_prop' in w; - return true; - } catch(e) { - return false; - } - } - - function supports_post_message(w) - { - var supports; - var type; - // Given IE implements postMessage across nested iframes but not across - // windows or tabs, you can't infer cross-origin communication from the presence - // of postMessage on the current window object only. - // - // Touching the postMessage prop on a window can throw if the window is - // not from the same origin AND post message is not supported in that - // browser. So just doing an existence test here won't do, you also need - // to wrap it in a try..cacth block. - try - { - type = typeof w.postMessage; - if (type === "function") - { - supports = true; - } - // IE8 supports postMessage, but implements it as a host object which - // returns "object" as its `typeof`. - else if (type === "object") - { - supports = true; - } - // This is the case where postMessage isn't supported AND accessing a - // window property across origins does NOT throw (e.g. old Safari browser). - else - { - supports = false; - } - } - catch(e) { - // This is the case where postMessage isn't supported AND accessing a - // window property across origins throws (e.g. old Firefox browser). - supports = false; - } - return supports; - } })(); // vim: set expandtab shiftwidth=4 tabstop=4: diff --git a/dom/imptests/webapps.mozbuild b/dom/imptests/webapps.mozbuild index 63da7a606ba..2da26c9784f 100644 --- a/dom/imptests/webapps.mozbuild +++ b/dom/imptests/webapps.mozbuild @@ -1,4 +1,4 @@ -# THIS FILE IS AUTOGENERATED BY importTestSuites.py - DO NOT EDIT +# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT DIRS += [ 'webapps/DOMCore/tests/approved', diff --git a/dom/imptests/webapps/DOMCore/tests/approved/test_interfaces.html b/dom/imptests/webapps/DOMCore/tests/approved/test_interfaces.html index 8d2134f7421..4c6bd2d330a 100644 --- a/dom/imptests/webapps/DOMCore/tests/approved/test_interfaces.html +++ b/dom/imptests/webapps/DOMCore/tests/approved/test_interfaces.html @@ -23,7 +23,7 @@ exception DOMException { const unsigned short NAMESPACE_ERR = 14; const unsigned short INVALID_ACCESS_ERR = 15; const unsigned short VALIDATION_ERR = 16; // historical - const unsigned short TYPE_MISMATCH_ERR = 17; // historical; use TypeError instead + const unsigned short TYPE_MISMATCH_ERR = 17; const unsigned short SECURITY_ERR = 18; const unsigned short NETWORK_ERR = 19; const unsigned short ABORT_ERR = 20; @@ -35,7 +35,6 @@ exception DOMException { unsigned short code; }; -[Constructor(DOMString name)] interface DOMError { readonly attribute DOMString name; }; @@ -46,7 +45,6 @@ interface Event { readonly attribute EventTarget? target; readonly attribute EventTarget? currentTarget; - const unsigned short NONE = 0; const unsigned short CAPTURING_PHASE = 1; const unsigned short AT_TARGET = 2; const unsigned short BUBBLING_PHASE = 3; @@ -60,31 +58,29 @@ interface Event { void preventDefault(); readonly attribute boolean defaultPrevented; - [Unforgeable] readonly attribute boolean isTrusted; + readonly attribute boolean isTrusted; readonly attribute DOMTimeStamp timeStamp; void initEvent(DOMString type, boolean bubbles, boolean cancelable); }; dictionary EventInit { - boolean bubbles = false; - boolean cancelable = false; + boolean bubbles; + boolean cancelable; }; [Constructor(DOMString type, optional CustomEventInit eventInitDict)] interface CustomEvent : Event { readonly attribute any detail; - - void initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any details); }; dictionary CustomEventInit : EventInit { - any detail = null; + any detail; }; interface EventTarget { - void addEventListener(DOMString type, EventListener? callback, optional boolean capture); - void removeEventListener(DOMString type, EventListener? callback, optional boolean capture); + void addEventListener(DOMString type, EventListener? listener, optional boolean capture); + void removeEventListener(DOMString type, EventListener? listener, optional boolean capture); boolean dispatchEvent(Event event); }; @@ -93,63 +89,71 @@ interface EventListener { void handleEvent(Event event); }; -[NoInterfaceObject] -interface ParentNode { - readonly attribute HTMLCollection children; - readonly attribute Element? firstElementChild; - readonly attribute Element? lastElementChild; - readonly attribute unsigned long childElementCount; - - void prepend((Node or DOMString)... nodes); - void append((Node or DOMString)... nodes); -}; -Document implements ParentNode; -DocumentFragment implements ParentNode; -Element implements ParentNode; - -[NoInterfaceObject] -interface ChildNode { - readonly attribute Element? previousElementSibling; - readonly attribute Element? nextElementSibling; - - void before((Node or DOMString)... nodes); - void after((Node or DOMString)... nodes); - void replace((Node or DOMString)... nodes); - void remove(); -}; -DocumentType implements ChildNode; -Element implements ChildNode; -CharacterData implements ChildNode; - [Constructor(MutationCallback callback)] interface MutationObserver { - void observe(Node target, MutationObserverInit options); + void observe(Node target, optional MutationObserverInit options); void disconnect(); - sequence takeRecords(); }; -callback MutationCallback = void (sequence mutations, MutationObserver observer); +[Callback] +interface MutationCallback { + void handleEvent(MutationRecord[] mutations, MutationObserver observer); +}; dictionary MutationObserverInit { - boolean childList = false; - boolean attributes = false; - boolean characterData = false; - boolean subtree = false; - boolean attributeOldValue = false; - boolean characterDataOldValue = false; - sequence attributeFilter; + // Mutation types + boolean childList; // If true, mutations affecting node’s childNodes are included. + boolean attributes; // If true, mutations affecting element’s attributes are included. + boolean characterData; // If true, mutations affecting the value of CharacterData nodes are included. + // [Note: If none of the known mutation types is specified, an Error is thrown] + + // Subtree observation + boolean subtree; // If true, the observed set of nodes for this registration should include + // descendants of MutationTarget (behavior described below). + + // Old values + boolean attributeOldValue; + // If true, MutationRecords describing changes to attributes should + // contain the value of the attribute before the change. If true + // without attribute: true specified, an Error is thrown. + + boolean characterDataOldValue; + // If true, MutationRecords describing changes to + // CharacterData nodes should contain the value + // of the node before the change. If true without + // characterData: true, an Error is thrown. + + // Filtering + DOMString[] attributeFilter; + // If provided, only changes to attributes with localName equaling + // one of the provided strings will be delivered. If provided without + // attribute: true, an Error is thrown. }; interface MutationRecord { + // Mutation type: one of 'childList', 'attributes', or 'characterData' readonly attribute DOMString type; + + // For childList and attributes, target is the owner node affected. + // For CharacterData, target is the node affected. readonly attribute Node target; + + // For type == 'childList', Sequence of added and removed nodes in this operation. readonly attribute NodeList addedNodes; readonly attribute NodeList removedNodes; - readonly attribute Node? previousSibling; - readonly attribute Node? nextSibling; - readonly attribute DOMString? attributeName; - readonly attribute DOMString? attributeNamespace; - readonly attribute DOMString? oldValue; + + // For type == 'childList', The siblings in childNodes immediately preceding following the first + // and last nodes added and/or removed. + readonly attribute Node previousSibling; + readonly attribute Node nextSibling; + + // For type == 'attribute', the name and namespaceURI of the attribute affected + readonly attribute DOMString attributeName; + readonly attribute DOMString attributeNamespace; + + // For type == 'attribute' or 'characterData', if requested, the value immediately + // preceding the mutation. + readonly attribute DOMString oldValue; }; interface Node : EventTarget { @@ -180,30 +184,29 @@ interface Node : EventTarget { readonly attribute Node? previousSibling; readonly attribute Node? nextSibling; - attribute DOMString? nodeValue; - attribute DOMString? textContent; - void normalize(); - - Node cloneNode(optional boolean deep); - boolean isEqualNode(Node? node); - const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01; const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02; const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04; const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08; const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10; - const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; + const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; // historical unsigned short compareDocumentPosition(Node other); boolean contains(Node? other); - DOMString? lookupPrefix(DOMString? namespace); - DOMString? lookupNamespaceURI(DOMString? prefix); - boolean isDefaultNamespace(DOMString? namespace); - + attribute DOMString? nodeValue; + attribute DOMString? textContent; Node insertBefore(Node node, Node? child); Node appendChild(Node node); Node replaceChild(Node node, Node child); Node removeChild(Node child); + void normalize(); + + Node cloneNode(optional boolean deep); + boolean isEqualNode(Node? node); + + DOMString lookupPrefix(DOMString? namespace); + DOMString lookupNamespaceURI(DOMString? prefix); + boolean isDefaultNamespace(DOMString? namespace); }; [Constructor] @@ -217,9 +220,9 @@ interface Document : Node { readonly attribute DocumentType? doctype; readonly attribute Element? documentElement; - HTMLCollection getElementsByTagName(DOMString localName); - HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); - HTMLCollection getElementsByClassName(DOMString classNames); + NodeList getElementsByTagName(DOMString qualifiedName); + NodeList getElementsByTagNameNS(DOMString? namespace, DOMString localName); + NodeList getElementsByClassName(DOMString classNames); Element? getElementById(DOMString elementId); Element createElement(DOMString localName); @@ -232,33 +235,47 @@ interface Document : Node { Node importNode(Node node, optional boolean deep); Node adoptNode(Node node); - Event createEvent(DOMString interface); + Event createEvent(DOMString eventInterfaceName); Range createRange(); - // NodeFilter.SHOW_ALL = 0xFFFFFFFF NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow, optional NodeFilter? filter); TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow, optional NodeFilter? filter); + + // NEW + // Invalid WebIDL https://www.w3.org/Bugs/Public/show_bug.cgi?id=15346 + //void prepend((Node or DOMString)... nodes); + //void append((Node or DOMString)... nodes); }; interface XMLDocument : Document {}; interface DOMImplementation { - DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); - XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, DocumentType? doctype); - Document createHTMLDocument(optional DOMString title); - boolean hasFeature(DOMString feature, [TreatNullAs=EmptyString] DOMString version); + + DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); + XMLDocument createDocument(DOMString? namespace, DOMString qualifiedName, DocumentType? doctype); + Document createHTMLDocument(DOMString title); }; -[Constructor] interface DocumentFragment : Node { + // NEW + // Invalid WebIDL https://www.w3.org/Bugs/Public/show_bug.cgi?id=15346 + //void prepend((Node or DOMString)... nodes); + //void append((Node or DOMString)... nodes); }; interface DocumentType : Node { readonly attribute DOMString name; readonly attribute DOMString publicId; readonly attribute DOMString systemId; + + // NEW + // Invalid WebIDL https://www.w3.org/Bugs/Public/show_bug.cgi?id=15346 + //void before((Node or DOMString)... nodes); + //void after((Node or DOMString)... nodes); + //void replace((Node or DOMString)... nodes); + void remove(); }; interface Element : Node { @@ -281,18 +298,34 @@ interface Element : Node { boolean hasAttribute(DOMString name); boolean hasAttributeNS(DOMString? namespace, DOMString localName); - HTMLCollection getElementsByTagName(DOMString localName); - HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); - HTMLCollection getElementsByClassName(DOMString classNames); + NodeList getElementsByTagName(DOMString qualifiedName); + NodeList getElementsByTagNameNS(DOMString? namespace, DOMString localName); + NodeList getElementsByClassName(DOMString classNames); + + readonly attribute HTMLCollection children; + readonly attribute Element? firstElementChild; + readonly attribute Element? lastElementChild; + readonly attribute Element? previousElementSibling; + readonly attribute Element? nextElementSibling; + readonly attribute unsigned long childElementCount; + + // NEW + // Invalid WebIDL https://www.w3.org/Bugs/Public/show_bug.cgi?id=15346 + //void prepend((Node or DOMString)... nodes); + //void append((Node or DOMString)... nodes); + //void before((Node or DOMString)... nodes); + //void after((Node or DOMString)... nodes); + //void replace((Node or DOMString)... nodes); + void remove(); }; interface Attr { - readonly attribute DOMString localName; + readonly attribute DOMString name; attribute DOMString value; - readonly attribute DOMString name; readonly attribute DOMString? namespaceURI; readonly attribute DOMString? prefix; + readonly attribute DOMString localName; }; interface CharacterData : Node { @@ -303,9 +336,15 @@ interface CharacterData : Node { void insertData(unsigned long offset, DOMString data); void deleteData(unsigned long offset, unsigned long count); void replaceData(unsigned long offset, unsigned long count, DOMString data); + + // NEW + // Invalid WebIDL https://www.w3.org/Bugs/Public/show_bug.cgi?id=15346 + //void before((Node or DOMString)... nodes); + //void after((Node or DOMString)... nodes); + //void replace((Node or DOMString)... nodes); + void remove(); }; -[Constructor(optional DOMString data)] interface Text : CharacterData { Text splitText(unsigned long offset); readonly attribute DOMString wholeText; @@ -315,11 +354,9 @@ interface ProcessingInstruction : CharacterData { readonly attribute DOMString target; }; -[Constructor(optional DOMString data)] interface Comment : CharacterData { }; -[Constructor] interface Range { readonly attribute Node startContainer; readonly attribute unsigned long startOffset; @@ -391,7 +428,8 @@ interface TreeWalker { [Callback] interface NodeFilter { - // Constants for acceptNode() + + // Constants for acceptNode const unsigned short FILTER_ACCEPT = 1; const unsigned short FILTER_REJECT = 2; const unsigned short FILTER_SKIP = 3; @@ -414,7 +452,6 @@ interface NodeFilter { unsigned short acceptNode(Node node); }; -[ArrayClass] interface NodeList { getter Node? item(unsigned long index); readonly attribute unsigned long length; @@ -426,14 +463,20 @@ interface HTMLCollection { getter object? namedItem(DOMString name); // only returns Element }; +interface DOMStringList { + readonly attribute unsigned long length; + getter DOMString? item(unsigned long index); + boolean contains(DOMString string); +}; + interface DOMTokenList { readonly attribute unsigned long length; getter DOMString? item(unsigned long index); boolean contains(DOMString token); - void add(DOMString... tokens); - void remove(DOMString... tokens); - boolean toggle(DOMString token, optional boolean force); - stringifier; + void add(DOMString token); + void remove(DOMString token); + boolean toggle(DOMString token); + stringifier DOMString (); }; interface DOMSettableTokenList : DOMTokenList { @@ -466,8 +509,8 @@ idlArray.add_objects({ ProcessingInstruction: ['xmlDoc.createProcessingInstruction("abc", "def")'], Comment: ['document.createComment("abc")'], Range: ['document.createRange()', 'detachedRange'], - NodeIterator: ['document.createNodeIterator(document.body, NodeFilter.SHOW_ALL, null, false)'], - TreeWalker: ['document.createTreeWalker(document.body, NodeFilter.SHOW_ALL, null, false)'], + NodeIterator: ['document.createNodeIterator(document.body, NodeFilter.SHOW_ALL, null)'], + TreeWalker: ['document.createTreeWalker(document.body, NodeFilter.SHOW_ALL, null)'], NodeList: ['document.querySelectorAll("script")'], HTMLCollection: ['document.body.children'], DOMTokenList: ['document.body.classList'], diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in index ad9a8f0de63..1d1a5905db5 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/Makefile.in @@ -17,6 +17,7 @@ MOCHITEST_FILES := \ test_CharacterData-insertData.html \ test_CharacterData-remove.html \ test_CharacterData-replaceData.html \ + test_ChildNode-remove.js \ test_Document-adoptNode.html \ test_Document-createComment.html \ test_Document-createElement.html \ @@ -26,7 +27,6 @@ MOCHITEST_FILES := \ test_Document-createProcessingInstruction-literal-1.xhtml \ test_Document-createProcessingInstruction-literal-2.xhtml \ test_Document-createProcessingInstruction.xhtml \ - test_Document-createTreeWalker.html \ test_Document-getElementById.html \ test_Document-getElementsByTagName.html \ test_Document-getElementsByTagNameNS.html \ @@ -47,7 +47,6 @@ MOCHITEST_FILES := \ test_Event-defaultPrevented.html \ test_Event-initEvent.html \ test_EventTarget-dispatchEvent.html \ - test_Event-type.html \ test_historical.html \ test_interfaces.html \ test_Node-appendChild.html \ @@ -74,7 +73,6 @@ MOCHITEST_FILES := \ case.js \ creators.js \ constants.js \ - ChildNode-remove.js \ Document-createProcessingInstruction.js \ productions.js \ $(NULL) diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/ChildNode-remove.js b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_ChildNode-remove.js similarity index 100% rename from dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/ChildNode-remove.js rename to dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_ChildNode-remove.js diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html index 9c27acb8edd..62a29d64a63 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_DOMImplementation-createDocument.html @@ -18,9 +18,7 @@ test(function() { * the doctype argument * the expected exception, or null if none */ - [null, null, false, new TypeError()], [null, null, null, null], - [null, undefined, null, null], [null, "", null, null], [null, "foo", null, null], [null, "1foo", null, "INVALID_CHARACTER_ERR"], @@ -35,22 +33,6 @@ test(function() { [null, "xml:foo", null, "NAMESPACE_ERR"], [null, "xmlns:foo", null, "NAMESPACE_ERR"], [null, "xmlfoo:bar", null, "NAMESPACE_ERR"], - [undefined, null, undefined, null], - [undefined, undefined, undefined, null], - [undefined, "", undefined, null], - [undefined, "foo", undefined, null], - [undefined, "1foo", undefined, "INVALID_CHARACTER_ERR"], - [undefined, "f1oo", undefined, null], - [undefined, "foo1", undefined, null], - [undefined, ":foo", undefined, "NAMESPACE_ERR"], - [undefined, "f:oo", undefined, "NAMESPACE_ERR"], - [undefined, "foo:", undefined, "NAMESPACE_ERR"], - [undefined, "xml", undefined, null], - [undefined, "xmlns", undefined, "NAMESPACE_ERR"], - [undefined, "xmlfoo", undefined, null], - [undefined, "xml:foo", undefined, "NAMESPACE_ERR"], - [undefined, "xmlns:foo", undefined, "NAMESPACE_ERR"], - [undefined, "xmlfoo:bar", undefined, "NAMESPACE_ERR"], ["http://example.com/", null, null, null], ["http://example.com/", "", null, null], ["http://example.com/", "foo", null, null], @@ -126,28 +108,36 @@ test(function() { ["foo:", "xml:foo", null, "NAMESPACE_ERR"], ["foo:", "xmlns:foo", null, "NAMESPACE_ERR"], ["foo:", "xmlfoo:bar", null, null], - [null, null, document.implementation.createDocumentType("foo", "", ""), null], - [null, null, document.doctype, null], // This causes a horrible WebKit bug (now fixed in trunk). - [null, null, function() { - var foo = document.implementation.createDocumentType("foo", "", ""); - document.implementation.createDocument(null, null, foo); - return foo; - }(), null], // DOCTYPE already associated with a document. - [null, null, function() { - var bar = document.implementation.createDocument(null, null, null); - return bar.implementation.createDocumentType("bar", "", ""); - }(), null], // DOCTYPE created by a different implementation. - [null, null, function() { - var bar = document.implementation.createDocument(null, null, null); - var magic = bar.implementation.createDocumentType("bar", "", ""); - bar.implementation.createDocument(null, null, magic); - return magic; - }(), null], // DOCTYPE created by a different implementation and already associated with a document. - [null, "foo", document.implementation.createDocumentType("foo", "", ""), null], - ["foo", null, document.implementation.createDocumentType("foo", "", ""), null], - ["foo", "bar", document.implementation.createDocumentType("foo", "", ""), null], ] + try { // XXX merge?! + var tempTests = tests.concat([ + [null, null, document.implementation.createDocumentType("foo", "", ""), null], + [null, null, document.doctype, "WRONG_DOCUMENT_ERR"], // This causes a horrible WebKit bug (now fixed in trunk). + [null, null, function() { + var foo = document.implementation.createDocumentType("foo", "", ""); + document.implementation.createDocument(null, null, foo); + return foo; + }(), "WRONG_DOCUMENT_ERR"], // DOCTYPE already associated with a document. + [null, null, function() { + var bar = document.implementation.createDocument(null, null, null); + return bar.implementation.createDocumentType("bar", "", ""); + }(), null], // DOCTYPE created by a different implementation. + [null, null, function() { + var bar = document.implementation.createDocument(null, null, null); + var magic = bar.implementation.createDocumentType("bar", "", ""); + bar.implementation.createDocument(null, null, magic); + return magic; + }(), "WRONG_DOCUMENT_ERR"], // DOCTYPE created by a different implementation and already associated with a document. + [null, "foo", document.implementation.createDocumentType("foo", "", ""), null], + ["foo", null, document.implementation.createDocumentType("foo", "", ""), null], + ["foo", "bar", document.implementation.createDocumentType("foo", "", ""), null], + ]); + tests = tempTests; + } catch (e) { + assert_unreached() + } + tests.forEach(function(t, i) { test(function() { var namespace = t[0], qualifiedName = t[1], doctype = t[2], expected = t[3] @@ -157,31 +147,14 @@ test(function() { var doc = document.implementation.createDocument(namespace, qualifiedName, doctype) assert_equals(doc.nodeType, Node.DOCUMENT_NODE) assert_equals(doc.nodeType, doc.DOCUMENT_NODE) - var omitRootElement = qualifiedName === null || String(qualifiedName) === "" - if (omitRootElement) { + if (qualifiedName === "" || qualifiedName === null) { assert_equals(doc.documentElement, null) } else { - var element = doc.documentElement - assert_not_equals(element, null) - assert_equals(element.nodeType, Node.ELEMENT_NODE) - assert_equals(element.ownerDocument, doc) - var qualified = String(qualifiedName), names = [] - if (qualified.indexOf(":") >= 0) { - names = qualified.split(":", 2) - } else { - names = [null, qualified] - } - assert_equals(element.prefix, names[0]) - assert_equals(element.localName, names[1]) - assert_equals(element.namespaceURI, namespace === undefined ? null : namespace) + assert_not_equals(doc.documentElement, null) + assert_equals(doc.documentElement.nodeType, Node.ELEMENT_NODE) } - if (!doctype) { - assert_equals(doc.doctype, null) - } else { - assert_equals(doc.doctype, doctype) - assert_equals(doc.doctype.ownerDocument, doc) - } - assert_equals(doc.childNodes.length, !omitRootElement + !!doctype) + assert_equals(doc.doctype, doctype) + assert_equals(doc.childNodes.length, !!qualifiedName + !!doctype) } }, "createDocument test " + i + ": " + t.map(function(el) { return format_value(el) })) }) diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElement.html b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElement.html index 677a781965a..7fc6b8a8c08 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElement.html +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-createElement.html @@ -10,18 +10,6 @@
- -
- diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html index 8a5303a442f..26161ac4fac 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Document-getElementsByTagName.html @@ -5,71 +5,22 @@
-

 
-
-
- diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml index d33406a74cf..09bbc8ca8f3 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Node-isEqualNode.xhtml @@ -50,7 +50,6 @@ function iframeLoaded() { assert_true(doc1.doctype.isEqualNode(doc2.doctype), "doc1.doctype.isEqualNode(doc2.doctype)") assert_true(doc1.isEqualNode(doc2), "doc1.isEqualNode(doc2)") }) - internalSubset.done() } } diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html index 7d2090b9c1b..637fb5907d7 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_NodeFilter-constants.html @@ -7,6 +7,7 @@ diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html index f0a3e451cd0..3dc4a61f43a 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-commonAncestorContainer.html @@ -7,7 +7,9 @@ test(function() { var range = document.createRange(); range.detach(); - assert_equals(range.commonAncestorContainer, document); + assert_throws("INVALID_STATE_ERR", function() { + range.commonAncestorContainer(); + }, "Detached Range must throw INVALID_STATE_ERR on accessing commonAncestorContainer"); }, "Detached Range") test(function() { var df = document.createDocumentFragment(); diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html index 2b289095e92..cb6b9c5fb13 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-comparePoint.html @@ -8,7 +8,7 @@ test(function() { var r = document.createRange(); r.detach() - assert_equals(r.comparePoint(document.body, 0), 1) + assert_throws("INVALID_STATE_ERR", function() { r.comparePoint(document.body, 0) }) }) test(function() { var r = document.createRange(); diff --git a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html index 87be46ad5e1..0600a3d2563 100644 --- a/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html +++ b/dom/imptests/webapps/DOMCore/tests/submissions/Ms2ger/test_Range-detach.html @@ -8,6 +8,6 @@ test(function() { var r = document.createRange(); r.detach() - r.detach() + assert_throws("INVALID_STATE_ERR", function() { r.detach() }) }) diff --git a/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/Makefile.in b/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/Makefile.in index e2a781d7d48..8e92e56305f 100644 --- a/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/Makefile.in +++ b/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/Makefile.in @@ -10,7 +10,6 @@ relativesrcdir := @relativesrcdir@ include $(DEPTH)/config/autoconf.mk MOCHITEST_FILES := \ - test_FormData-append.html \ test_interfaces.html \ test_setrequestheader-invalid-arguments.htm \ $(NULL) diff --git a/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_FormData-append.html b/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_FormData-append.html deleted file mode 100644 index b05c5169b54..00000000000 --- a/dom/imptests/webapps/XMLHttpRequest/tests/submissions/Ms2ger/test_FormData-append.html +++ /dev/null @@ -1,14 +0,0 @@ - - -FormData.append - - - -
- diff --git a/dom/webidl/DOMImplementation.webidl b/dom/webidl/DOMImplementation.webidl index f7fa91c422a..e3021a9233f 100644 --- a/dom/webidl/DOMImplementation.webidl +++ b/dom/webidl/DOMImplementation.webidl @@ -23,5 +23,5 @@ interface DOMImplementation { [TreatNullAs=EmptyString] DOMString qualifiedName, DocumentType? doctype); [Throws] - Document createHTMLDocument(optional DOMString title); + Document createHTMLDocument(DOMString title); };