Index: third_party/WebKit/LayoutTests/fast/dom/custom/create-element-dictionary-is-type-not-found.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-dictionary-is-type-not-found.html b/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-dictionary-is-type-not-found.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7a717487d646a7586fafb23965489ccb4010b652 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-dictionary-is-type-not-found.html |
@@ -0,0 +1,17 @@ |
+<!doctype html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<script> |
+test(() => { |
+ document.registerElement('x-button', {extends: 'button'}); |
+ var notFoundErrorThrown = 0; |
+ var elem; |
+ try { |
+ elem = document.createElement('button', {is: 'unknown'}); |
+ } catch (NotFoundError) { |
+ notFoundErrorThrown = 1; |
+ } |
+ assert_equals(elem, undefined); |
+ assert_equals(notFoundErrorThrown, 1); |
+}, "Test for Issue 661968: If 'is' is not null and custom element definition not found, NotFoundError should be thrown"); |
+</script> |