blob: 509762b5bb580be2238e338c27372518b21ba151 [file] [log] [blame]
<!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>