Auto merge of #17935 - cbrewster:ce_upgrades, r=jdm

Custom element upgrades

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17935)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-09 17:22:28 -05:00 committed by GitHub
commit a087fee4b4
30 changed files with 318 additions and 295 deletions

View file

@ -1,8 +0,0 @@
[custom-element-reaction-queue.html]
type: testharness
[Upgrading a custom element must invoke attributeChangedCallback and connectedCallback before start upgrading another element]
expected: FAIL
[Mutating a undefined custom element while upgrading a custom element must not enqueue or invoke reactions on the mutated element]
expected: FAIL

View file

@ -3,9 +3,6 @@
[HTML parser must not instantiate custom elements inside template elements]
expected: FAIL
[HTML parser must use the registry of the content document inside an iframe]
expected: FAIL
[HTML parser must use the registry of window.document in a document created by document.implementation.createHTMLDocument()]
expected: FAIL

View file

@ -1,5 +0,0 @@
[reaction-timing.html]
type: testharness
[Calling Node.prototype.cloneNode(false) must push a new element queue to the processing stack]
expected: FAIL

View file

@ -1,20 +1,5 @@
[Document.html]
type: testharness
[importNode on Document must construct a new custom element when importing a custom element from a template]
expected: FAIL
[execCommand on Document must enqueue a disconnected reaction when deleting a custom element from a contenteditable element]
expected: FAIL
[body on Document must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[open on Document must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[write on Document must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[writeln on Document must enqueue disconnectedCallback when removing a custom element]
expected: FAIL

View file

@ -12,18 +12,6 @@
[setAttributeNodeNS on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[innerHTML on Element must enqueue a connected reaction for a newly constructed custom element]
expected: FAIL
[innerHTML on Element must enqueue a attributeChanged reaction for a newly constructed custom element]
expected: FAIL
[outerHTML on Element must enqueue a connected reaction for a newly constructed custom element]
expected: FAIL
[outerHTML on Element must enqueue a attributeChanged reaction for a newly constructed custom element]
expected: FAIL
[insertAdjacentHTML on Element must enqueue a connected reaction for a newly constructed custom element]
expected: FAIL

View file

@ -1,5 +0,0 @@
[HTMLAnchorElement.html]
type: testharness
[text on HTMLAnchorElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL

View file

@ -1,5 +0,0 @@
[HTMLOptionElement.html]
type: testharness
[text on HTMLOptionElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL

View file

@ -3,30 +3,9 @@
[caption on HTMLTableElement must enqueue connectedCallback when inserting a custom element]
expected: FAIL
[caption on HTMLTableElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[deleteCaption() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[tHead on HTMLTableElement must enqueue connectedCallback when inserting a custom element]
expected: FAIL
[tHead on HTMLTableElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[deleteTHead() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[tFoot on HTMLTableElement must enqueue connectedCallback when inserting a custom element]
expected: FAIL
[tFoot on HTMLTableElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[deleteTFoot() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[deleteRow() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL

View file

@ -1,5 +0,0 @@
[HTMLTableRowElement.html]
type: testharness
[deleteCell() on HTMLTableRowElement must enqueue disconnectedCallback when removing a custom element]
expected: FAIL

View file

@ -1,8 +0,0 @@
[HTMLTableSectionElement.html]
type: testharness
[deleteRow() on HTMLTableSectionElement on thead must enqueue disconnectedCallback when removing a custom element]
expected: FAIL
[deleteRow() on HTMLTableSectionElement on tfoot must enqueue disconnectedCallback when removing a custom element]
expected: FAIL

View file

@ -1,11 +0,0 @@
[Node.html]
type: testharness
[cloneNode on Node must enqueue an attributeChanged reaction when cloning an element with an observed attribute]
expected: FAIL
[cloneNode on Node must not enqueue an attributeChanged reaction when cloning an element with an unobserved attribute]
expected: FAIL
[cloneNode on Node must enqueue an attributeChanged reaction when cloning an element only for observed attributes]
expected: FAIL

View file

@ -1,14 +1,5 @@
[Range.html]
type: testharness
[cloneContents on Range must enqueue an attributeChanged reaction when cloning an element with an observed attribute]
expected: FAIL
[cloneContents on Range must not enqueue an attributeChanged reaction when cloning an element with an unobserved attribute]
expected: FAIL
[cloneContents on Range must enqueue an attributeChanged reaction when cloning an element only for observed attributes]
expected: FAIL
[createContextualFragment on Range must construct a custom element]
expected: FAIL

View file

@ -1,50 +0,0 @@
[upgrading.html]
type: testharness
[Creating an element in the document of the template elements and inserting into the document must not enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in the document of the template elements and adopting back to a document with browsing context must enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in a new document and inserting into the document must not enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in a new document and adopting back to a document with browsing context must enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in a cloned document and inserting into the document must not enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in a cloned document and adopting back to a document with browsing context must enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in a document created by createHTMLDocument and inserting into the document must not enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in a document created by createHTMLDocument and adopting back to a document with browsing context must enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in an HTML document created by createDocument and inserting into the document must not enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in an HTML document created by createDocument and adopting back to a document with browsing context must enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in an HTML document fetched by XHR and inserting into the document must not enqueue a custom element upgrade reaction]
expected: FAIL
[Creating an element in an HTML document fetched by XHR and adopting back to a document with browsing context must enqueue a custom element upgrade reaction]
expected: FAIL
["define" in the document of an iframe must not enqueue a custom element upgrade reaction on a disconnected unresolved custom element]
expected: FAIL
[Inserting an unresolved custom element into the document of an iframe must enqueue a custom element upgrade reaction]
expected: FAIL
["define" in the document of an iframe must enqueue a custom element upgrade reaction on a connected unresolved custom element]
expected: FAIL
[Adopting and inserting an unresolved custom element into the document of an iframe must enqueue a custom element upgrade reaction]
expected: FAIL

View file

@ -1,26 +0,0 @@
[Node-cloneNode.html]
type: testharness
[Node.prototype.cloneNode(false) must be able to clone a custom element]
expected: FAIL
[Node.prototype.cloneNode(false) must be able to clone a custom element inside an iframe]
expected: FAIL
[Node.prototype.cloneNode(true) must be able to clone a descendent custom element]
expected: FAIL
[Node.prototype.cloneNode(true) must set parentNode, previousSibling, and nextSibling before upgrading custom elements]
expected: FAIL
[HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself after super() call]
expected: FAIL
[HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself before super() call]
expected: FAIL
[Upgrading a custom element must throw InvalidStateError when the custom element's constructor returns another element]
expected: FAIL
[Inserting an element must not try to upgrade a custom element when it had already failed to upgrade once]
expected: FAIL

View file

@ -1,17 +0,0 @@
[upgrading-enqueue-reactions.html]
type: testharness
[Upgrading a custom element must enqueue attributeChangedCallback on each attribute]
expected: FAIL
[Upgrading a custom element not must enqueue attributeChangedCallback on unobserved attributes]
expected: FAIL
[Upgrading a custom element must enqueue connectedCallback if the element in the document]
expected: FAIL
[Upgrading a custom element must enqueue attributeChangedCallback before connectedCallback]
expected: FAIL
[Upgrading a custom element must not invoke attributeChangedCallback and connectedCallback when the element failed to upgrade]
expected: FAIL

View file

@ -1,14 +0,0 @@
[upgrading-parser-created-element.html]
type: testharness
[Element.prototype.createElement must add an unresolved custom element to the upgrade candidates map]
expected: FAIL
[HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself after super() call]
expected: FAIL
[HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself before super() call]
expected: FAIL
[Upgrading a custom element must throw an InvalidStateError when the returned element is not SameValue as the upgraded element]
expected: FAIL

View file

@ -42,12 +42,6 @@
[Interfaces for BASEFONT]
expected: FAIL
[Interfaces for foo-bar]
expected: FAIL
[Interfaces for FOO-BAR]
expected: FAIL
[Interfaces for menuitem]
expected: FAIL

View file

@ -26534,7 +26534,7 @@
"testharness"
],
"mozilla/collections.html": [
"f1029d519aa7017a1a3d18a891a0774b9a39f847",
"aa060d1e5d1364224f2c2151e5f8b9580ac4427e",
"testharness"
],
"mozilla/createEvent-storageevent.html": [
@ -27534,7 +27534,7 @@
"testharness"
],
"mozilla/prototypes.html": [
"bb4824ae242ed89485a272f6ef74631d6fea62be",
"e19d75682a83f4d2de1cbdf053aadfda181d6725",
"testharness"
],
"mozilla/proxy_setter.html": [

View file

@ -63,7 +63,7 @@
<track></track>
</video>
<foo-á>hi</foo-á>
<fooá>hi</fooá>
<script>
test(function() {
@ -142,7 +142,7 @@ test(function() {
// Test non-ASCII tag names. Uppercasing is ASCII-only per spec:
// http://dom.spec.whatwg.org/#dom-element-tagname
check_tag("foo-á", 1, [HTMLUnknownElement], "FOO-á");
check_tag("fooá", 1, [HTMLUnknownElement], "FOOá");
});
</script>
</body>

View file

@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<foo-á>foo</foo-á>
<fooá>foo</fooá>
<script>
test(function() {
assert_true(window.document instanceof Node, "Should be Node");
@ -18,8 +18,8 @@ test(function() {
assert_true(window.document.documentElement instanceof HTMLHtmlElement, "Should be HTMLHtmlElement");
assert_true(window.document instanceof Document, "Should be Document");
assert_equals(window.document.documentElement.tagName, "HTML");
assert_true(window.document.getElementsByTagName('foo-á')[0] instanceof HTMLUnknownElement, "Should be HTMLUnknownElement");
assert_equals(window.document.getElementsByTagName('foo-á')[0].tagName, "FOO-á");
assert_true(window.document.getElementsByTagName('fooá')[0] instanceof HTMLUnknownElement, "Should be HTMLUnknownElement");
assert_equals(window.document.getElementsByTagName('fooá')[0].tagName, "FOOá");
});
</script>
</body>