Index: third_party/WebKit/LayoutTests/fast/dom/custom/custom-elements-registry.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/custom/custom-elements-registry.html b/third_party/WebKit/LayoutTests/fast/dom/custom/custom-elements-registry.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..509762b5bb580be2238e338c27372518b21ba151 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/dom/custom/custom-elements-registry.html |
@@ -0,0 +1,20 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<script> |
+test(function () { |
+ assert_true('customElements' in window, '"customElements" exists in window'); |
+ assert_true('define' in window.customElements, '"define" exists in window.customElements'); |
+}, 'window.customElements.define is defined'); |
+ |
+test(function () { |
+ assert_throws(null, function () { window.customElements.define(); }, |
+ '"define" without arguments should throw TypeError'); |
+ assert_throws(null, function () { window.customElements.define("x-x"); }, |
+ '"define" with one argument should throw TypeError'); |
+ |
+ window.customElements.define('x-empty-function', function () { }); |
+ window.customElements.define('x-empty-class', class { }); |
+ |
+}, 'window.customElements.define requires two arguments'); |
+</script> |