OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <script> |
| 5 test(function () { |
| 6 assert_true('customElements' in window, '"customElements" exists in window'); |
| 7 assert_true('define' in window.customElements, '"define" exists in window.cust
omElements'); |
| 8 }, 'window.customElements.define is defined'); |
| 9 |
| 10 test(function () { |
| 11 assert_throws(null, function () { window.customElements.define(); }, |
| 12 '"define" without arguments should throw TypeError'); |
| 13 assert_throws(null, function () { window.customElements.define("x-x"); }, |
| 14 '"define" with one argument should throw TypeError'); |
| 15 |
| 16 window.customElements.define('x-empty-function', function () { }); |
| 17 window.customElements.define('x-empty-class', class { }); |
| 18 |
| 19 }, 'window.customElements.define requires two arguments'); |
| 20 </script> |
OLD | NEW |