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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/custom/custom-elements-registry.html

Issue 1810973004: Add the CustomElementsRegistry interface behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (merge conflict) Created 4 years, 8 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/LayoutTests/webexposed/global-interface-listing-expected.txt » ('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/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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698