Skip to content

Commit

Permalink
Run custom element tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrewster committed May 30, 2017
1 parent 38a6a3b commit 9d36ea5
Show file tree
Hide file tree
Showing 47 changed files with 1,577 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/wpt/include.ini
Expand Up @@ -13,6 +13,8 @@ skip: true
skip: false
[css-values]
skip: false
[custom-elements]
skip: false
[dom]
skip: false
[domparsing]
Expand Down
113 changes: 113 additions & 0 deletions tests/wpt/metadata/custom-elements/CustomElementRegistry.html.ini
@@ -0,0 +1,113 @@
[CustomElementRegistry.html]
type: testharness
[CustomElementRegistry interface must have define as a method]
expected: FAIL

[customElements.define must throw when the element interface is not a constructor]
expected: FAIL

[customElements.define must not throw the constructor is HTMLElement]
expected: FAIL

[customElements.define must throw with an invalid name]
expected: FAIL

[customElements.define must throw when there is already a custom element of the same name]
expected: FAIL

[customElements.define must throw a NotSupportedError when there is already a custom element with the same class]
expected: FAIL

[customElements.define must throw a NotSupportedError when element definition is running flag is set]
expected: FAIL

[customElements.define must check IsConstructor on the constructor before checking the element definition is running flag]
expected: FAIL

[customElements.define must validate the custom element name before checking the element definition is running flag]
expected: FAIL

[customElements.define unset the element definition is running flag before upgrading custom elements]
expected: FAIL

[customElements.define must not throw when defining another custom element in a different global object during Get(constructor, "prototype")]
expected: FAIL

[Custom Elements: CustomElementRegistry interface]
expected: FAIL

[customElements.define must get "prototype" property of the constructor]
expected: FAIL

[customElements.define must rethrow an exception thrown while getting "prototype" property of the constructor]
expected: FAIL

[customElements.define must throw when "prototype" property of the constructor is not an object]
expected: FAIL

[customElements.define must get callbacks of the constructor prototype]
expected: FAIL

[customElements.define must rethrow an exception thrown while getting callbacks on the constructor prototype]
expected: FAIL

[customElements.define must rethrow an exception thrown while converting a callback value to Function callback type]
expected: FAIL

[customElements.define must get "observedAttributes" property on the constructor prototype when "attributeChangedCallback" is present]
expected: FAIL

[customElements.define must rethrow an exception thrown while getting observedAttributes on the constructor prototype]
expected: FAIL

[customElements.define must rethrow an exception thrown while converting the value of observedAttributes to sequence<DOMString>]
expected: FAIL

[customElements.define must rethrow an exception thrown while iterating over observedAttributes to sequence<DOMString>]
expected: FAIL

[customElements.define must rethrow an exception thrown while retrieving Symbol.iterator on observedAttributes]
expected: FAIL

[customElements.define must not throw even if "observedAttributes" fails to convert if "attributeChangedCallback" is not defined]
expected: FAIL

[customElements.define must define an instantiatable custom element]
expected: FAIL

[customElements.define must upgrade elements in the shadow-including tree order]
expected: FAIL

[CustomElementRegistry interface must have get as a method]
expected: FAIL

[customElements.get must return undefined when the registry does not contain an entry with the given name]
expected: FAIL

[customElements.get must return undefined when the registry does not contain an entry with the given name even if the name was not a valid custom element name]
expected: FAIL

[customElements.get return the constructor of the entry with the given name when there is a matching entry.]
expected: FAIL

[customElements.whenDefined must return a promise for a valid custom element name]
expected: FAIL

[customElements.whenDefined must return the same promise each time invoked for a valid custom element name which has not been defined]
expected: FAIL

[customElements.whenDefined must return an unresolved promise when the registry does not contain the entry with the given name]
expected: FAIL

[customElements.whenDefined must return a rejected promise when the given name is not a valid custom element name]
expected: FAIL

[customElements.whenDefined must return a resolved promise when the registry contains the entry with the given name]
expected: FAIL

[customElements.whenDefined must return a new resolved promise each time invoked when the registry contains the entry with the given name]
expected: FAIL

[A promise returned by customElements.whenDefined must be resolved by "define"]
expected: FAIL

38 changes: 38 additions & 0 deletions tests/wpt/metadata/custom-elements/Document-createElement.html.ini
@@ -0,0 +1,38 @@
[Document-createElement.html]
type: testharness
[document.createElement must create an instance of custom elements]
expected: FAIL

[document.createElement must report a TypeError when the result of Construct is not a DOM node]
expected: FAIL

[document.createElement must report a TypeError when the result of Construct is a TextNode]
expected: FAIL

[document.createElement must report a NotSupportedError when attribute is added by setAttribute during construction]
expected: FAIL

[document.createElement must report a NotSupportedError when attribute is added by attributes.setNamedItem during construction]
expected: FAIL

[document.createElement must not report a NotSupportedError when attribute is added and removed during construction]
expected: FAIL

[document.createElement must report a NotSupportedError when a Text child is added during construction]
expected: FAIL

[document.createElement must report a NotSupportedError when a Comment child is added during construction]
expected: FAIL

[document.createElement must report a NotSupportedError when an element child is added during construction]
expected: FAIL

[document.createElement must not report a NotSupportedError when an element child is added and removed during construction]
expected: FAIL

[document.createElement must report a NotSupportedError when the element gets inserted into another element during construction]
expected: FAIL

[document.createElement must not report a NotSupportedError when the element is inserted and removed from another element during construction]
expected: FAIL

@@ -0,0 +1,17 @@
[HTMLElement-constructor.html]
type: testharness
[HTMLElement constructor must infer the tag name from the element interface]
expected: FAIL

[HTMLElement constructor must allow subclassing a custom element]
expected: FAIL

[HTMLElement constructor must allow subclassing an user-defined subclass of HTMLElement]
expected: FAIL

[HTMLElement constructor must throw a TypeError when NewTarget is equal to itself]
expected: FAIL

[HTMLElement constructor must throw a TypeError when NewTarget is equal to itself via a Proxy object]
expected: FAIL

176 changes: 176 additions & 0 deletions tests/wpt/metadata/custom-elements/adopted-callback.html.ini
@@ -0,0 +1,176 @@
[adopted-callback.html]
type: testharness
[Inserting a custom element into the owner document must not enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving a custom element from the owner document into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting an ancestor of custom element into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving an ancestor of custom element from the owner document into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a shadow tree in the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting the shadow host of a custom element into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving the shadow host of a custom element from the owner document into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a detached shadow tree that belongs to the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving a custom element from the owner document into a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting an ancestor of custom element into a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving an ancestor of custom element from the owner document into a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a shadow tree in a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting the shadow host of a custom element into a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving the shadow host of a custom element from the owner document into a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a detached shadow tree that belongs to a new document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving a custom element from the owner document into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting an ancestor of custom element into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving an ancestor of custom element from the owner document into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a shadow tree in a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting the shadow host of a custom element into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving the shadow host of a custom element from the owner document into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a detached shadow tree that belongs to a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving a custom element from the owner document into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting an ancestor of custom element into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving an ancestor of custom element from the owner document into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a shadow tree in a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting the shadow host of a custom element into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving the shadow host of a custom element from the owner document into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a detached shadow tree that belongs to a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving a custom element from the owner document into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting an ancestor of custom element into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving an ancestor of custom element from the owner document into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a shadow tree in an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting the shadow host of a custom element into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving the shadow host of a custom element from the owner document into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a detached shadow tree that belongs to an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving a custom element from the owner document into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting an ancestor of custom element into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving an ancestor of custom element from the owner document into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a shadow tree in the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting the shadow host of a custom element into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving the shadow host of a custom element from the owner document into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a detached shadow tree that belongs to the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving a custom element from the owner document into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting an ancestor of custom element into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving an ancestor of custom element from the owner document into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a shadow tree in an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting the shadow host of a custom element into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Moving the shadow host of a custom element from the owner document into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Inserting a custom element into a detached shadow tree that belongs to an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

[Custom Elements: adoptedCallback]
expected: FAIL

@@ -0,0 +1,35 @@
[attribute-changed-callback.html]
type: testharness
[setAttribute and removeAttribute must enqueue and invoke attributeChangedCallback]
expected: FAIL

[setAttributeNS and removeAttributeNS must enqueue and invoke attributeChangedCallback]
expected: FAIL

[setAttributeNode and removeAttributeNode must enqueue and invoke attributeChangedCallback for an HTML attribute]
expected: FAIL

[setAttributeNode and removeAttributeNS must enqueue and invoke attributeChangedCallback for an SVG attribute]
expected: FAIL

[Mutating attributeChangedCallback after calling customElements.define must not affect the callback being invoked]
expected: FAIL

[attributedChangedCallback must not be invoked when the observed attributes does not contain the attribute]
expected: FAIL

[Mutating observedAttributes after calling customElements.define must not affect the set of attributes for which attributedChangedCallback is invoked]
expected: FAIL

[attributedChangedCallback must be enqueued for attributes specified in a non-Array iterable observedAttributes]
expected: FAIL

[attributedChangedCallback must be enqueued for style attribute change by mutating inline style declaration]
expected: FAIL

[attributedChangedCallback must not be enqueued when mutating inline style declaration if the style attribute is not observed]
expected: FAIL

[Custom Elements: attributeChangedCallback]
expected: FAIL

0 comments on commit 9d36ea5

Please sign in to comment.