Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html

Issue 2320553002: Custom Elements: HTMLElement constructor tests (Closed)
Patch Set: wraping up long stringl literal Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/custom-elements/spec/construct.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html b/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
index ca3c310d29f87fd57cb8ce96fa2cb44683df5cdc..c2e88ab3f84c2f0f60a787928e32b9e7240dcad7 100644
--- a/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
+++ b/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
@@ -372,41 +372,5 @@ test_with_window((w) => {
assert_false( observedAttributes_invoked, 'Get(constructor, observedAttributes) should not be invoked');
}, 'Get(constructor, observedAttributes) should not execute if ' +
'attributeChangedCallback is undefined');
-
-// TODO(dominicc): I think the order and timing of checks the tests
-// below exercise has changed. Update these tests. crbug.com/643052
-
-// step 2
-// 2. If constructor is an interface object whose corresponding interface either is
-// HTMLElement or has HTMLElement in its set of inherited interfaces, throw
-// a TypeError and abort these steps.
-// 3. If name is not a valid custom element name, then throw a "SyntaxError" DOMException
-// and abort these steps.
-test_with_window((w) => {
- let invalid_name = 'annotation-xml';
- // TODO(davaajav): change this to TypeError, when we add a failure expectation to this file
- assert_throws_dom_exception(w, 'SYNTAX_ERR', () => {
- w.customElements.define(invalid_name, HTMLElement);
- }, 'defining a constructor that is an interface object whose interface is HTMLElement' +
- 'should throw TypeError not SyntaxError');
-}, 'Invalid constructor');
-
-// step 2
-test_with_window((w) => {
- let invalid_name = 'annotation-xml';
- assert_throws_dom_exception(w, 'SYNTAX_ERR', () => {
- w.customElements.define(invalid_name, HTMLButtonElement);
- }, 'defining a constructor that is an interface object who has HTMLElement' +
- 'in its set of inhertied interfaces should throw TypeError not SyntaxError');
-}, 'Invalid constructor');
-
-// step 2
-test_with_window((w) => {
- let invalid_name = 'annotation-xml';
- assert_throws_dom_exception(w, 'SYNTAX_ERR', () => {
- w.customElements.define(invalid_name, class extends HTMLElement {});
- }, 'defining author-defined custom element constructor should pass this ' +
- 'step without throwing TypeError');
-}, 'Invalid constructor');
</script>
</body>
« no previous file with comments | « third_party/WebKit/LayoutTests/custom-elements/spec/construct.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698