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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/custom/create-element-second-arg.html

Issue 2334223005: 2nd arg of document.createElement should be an object (Closed)
Patch Set: Remove deprecation warning for now. Created 4 years, 2 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698