Index: third_party/WebKit/LayoutTests/fast/dom/custom/create-element-second-arg.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-second-arg.html b/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-second-arg.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..09de9900395dcda77e0080c676eb51779a012129 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-second-arg.html |
@@ -0,0 +1,16 @@ |
+<!doctype html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<script> |
+test(() => { |
+ var XButton = document.registerElement('x-button', {extends: 'button'}); |
+ var elem = document.createElement('button', 'x-button'); |
+ assert_equals(elem.constructor, XButton); |
+ |
+ elem = document.createElement('button', {is: 'x-button'}); |
+ assert_equals(elem.constructor, XButton); |
+ |
+ elem = document.createElement('button', {toString: () => 'x-button'}); |
+ assert_equals(elem.constructor, XButton); |
+}, "Test for Issue 637353: 2nd arg of document.createElement should be an object"); |
+</script> |