OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>When an HTML Document is loaded in a browsing context, a new registry mus
t be created and associated with this document</title> | |
5 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru
"> | |
6 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru"> | |
7 <meta name="assert" content="When an HTML Document is loaded in a browsing conte
xt, a new registry must be created and associated with this document."> | |
8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#creating-and-passin
g-registries"> | |
9 <script src="../../../../resources/testharness.js"></script> | |
10 <script src="../../../../resources/testharnessreport.js"></script> | |
11 <script src="../testcommon.js"></script> | |
12 </head> | |
13 <body> | |
14 <div id="log"></div> | |
15 <script> | |
16 testInIFrame('../resources/blank.html', function(doc) { | |
17 try { | |
18 doc.registerElement('x-element'); | |
19 } catch (e) { | |
20 assert_unreached('Unexpected exception, while registering a valid custom
element'); | |
21 } | |
22 }, 'Document, loaded into browsing context, must have a new empty registry'); | |
23 | |
24 | |
25 testInIFrame('../resources/blank.html', function(loadedDocument) { | |
26 var createdDocument = document.implementation.createHTMLDocument('Test Docum
ent'); | |
27 // Let's check that loadedDocument and createdDocument use different registe
ries. | |
28 createdDocument.registerElement('x-element'); | |
29 try { | |
30 loadedDocument.registerElement('x-element'); | |
31 } catch (e) { | |
32 assert_unreached('Unexpected exception while registering a custom elemen
t ' + | |
33 'in a document, which has it\'s own registry'); | |
34 } | |
35 }, 'Document, loaded into browsing context, must have a new empty registry, ' + | |
36 'which is different from other documents\' registries'); | |
37 </script> | |
38 </body> | |
39 </html> | |
OLD | NEW |