OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Document, created with createHTMLDocument or createDocument with HTML nam
espace, should share registry with the associated document</title> | 4 <title>Document, created with createHTMLDocument or createDocument with HTML nam
espace, should share registry with the associated document</title> |
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru"> | 5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru"> |
6 <meta name="assert" content="When DOMImplementation's createDocument method is i
nvoked with namespace set to HTML Namespace or when the createHTMLDocument metho
d is invoked, use the registry of the associated document to the new instance."> | 6 <meta name="assert" content="When DOMImplementation's createDocument method is i
nvoked with namespace set to HTML Namespace or when the createHTMLDocument metho
d is invoked, use the registry of the associated document to the new instance."> |
7 <link rel="help" href="http://www.w3.org/TR/custom-elements/#creating-and-passin
g-registries"> | 7 <link rel="help" href="http://www.w3.org/TR/custom-elements/#creating-and-passin
g-registries"> |
8 <script src="../../../../resources/testharness.js"></script> | 8 <script src="../../../../resources/testharness.js"></script> |
9 <script src="../../../../resources/testharnessreport.js"></script> | 9 <script src="../../../../resources/testharnessreport.js"></script> |
10 <script src="../testcommon.js"></script> | 10 <script src="../testcommon.js"></script> |
11 <link rel="stylesheet" href="../../../../resources/testharness.css"> | |
12 </head> | 11 </head> |
13 <body> | 12 <body> |
14 <div id="log"></div> | 13 <div id="log"></div> |
15 <script> | 14 <script> |
16 test(function() { | 15 test(function() { |
17 var doc = newHTMLDocument(); | 16 var doc = newHTMLDocument(); |
18 var name = 'x-frame'; | 17 var name = 'x-frame'; |
19 | 18 |
20 var GeneratedConstructor = doc.registerElement(name); | 19 var GeneratedConstructor = doc.registerElement(name); |
21 var doc2 = doc.implementation.createHTMLDocument('Document 2'); | 20 var doc2 = doc.implementation.createHTMLDocument('Document 2'); |
(...skipping 21 matching lines...) Expand all Loading... |
43 'Exception should be thrown for custom element, ' + | 42 'Exception should be thrown for custom element, ' + |
44 'which is already registered in shared registry'); | 43 'which is already registered in shared registry'); |
45 | 44 |
46 var xframe = doc2.createElement(name); | 45 var xframe = doc2.createElement(name); |
47 assert_true(xframe instanceof GeneratedConstructor, | 46 assert_true(xframe instanceof GeneratedConstructor, |
48 'Created element should be x-frame instance'); | 47 'Created element should be x-frame instance'); |
49 }, 'Document created by createDocument with HTML namespace should share an exist
ing registry'); | 48 }, 'Document created by createDocument with HTML namespace should share an exist
ing registry'); |
50 </script> | 49 </script> |
51 </body> | 50 </body> |
52 </html> | 51 </html> |
OLD | NEW |