| Index: LayoutTests/imported/web-platform-tests/custom-elements/registering-custom-elements/element-registration-algorithm-no-registry.html
|
| diff --git a/LayoutTests/imported/web-platform-tests/custom-elements/registering-custom-elements/element-registration-algorithm-no-registry.html b/LayoutTests/imported/web-platform-tests/custom-elements/registering-custom-elements/element-registration-algorithm-no-registry.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c644b6c0bd59163cbeda12991050c1ddfeb9a43a
|
| --- /dev/null
|
| +++ b/LayoutTests/imported/web-platform-tests/custom-elements/registering-custom-elements/element-registration-algorithm-no-registry.html
|
| @@ -0,0 +1,40 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<title>If document has no registry NotSupportedError is thrown</title>
|
| +<meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru">
|
| +<meta name="assert" content="If REGISTRY does not exist, set ERROR to NoRegistry and stop.">
|
| +<link rel="help" href="http://www.w3.org/TR/custom-elements/#dfn-element-registration-algorithm">
|
| +<script src="../../../../resources/testharness.js"></script>
|
| +<script src="../../../../resources/testharnessreport.js"></script>
|
| +<script src="../testcommon.js"></script>
|
| +<link rel="stylesheet" href="../../../../resources/testharness.css">
|
| +</head>
|
| +<body>
|
| +<div id="log"></div>
|
| +<script>
|
| +test(function() {
|
| + var doc = document.implementation.createDocument(null, 'test', null);
|
| + assert_throws('NotSupportedError', function(){
|
| + doc.registerElement('x-a');
|
| + }, 'Registering valid custom element in document ' +
|
| + 'without registry should throw NotSupportedError');
|
| +
|
| +}, 'Registering valid custom element without options in document ' +
|
| + 'without registry should throw NotSupportedError');
|
| +
|
| +
|
| +test(function() {
|
| + var doc = document.implementation.createDocument(null, 'test', null);
|
| + var proto = Object.create(HTMLElement.prototype);
|
| +
|
| + assert_throws('NotSupportedError', function(){
|
| + doc.registerElement('x-b', { prototype: proto, extends: 'a'});
|
| + }, 'Registering valid custom element in document ' +
|
| + 'without registry should throw NotSupportedError');
|
| +
|
| +}, 'Registering valid custom element with options in document ' +
|
| + 'without registry should throw NotSupportedError');
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|