| OLD | NEW | 
|   1 <!DOCTYPE html> |   1 <!DOCTYPE html> | 
|   2 <html> |   2 <html> | 
|   3 <head> |   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> |   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
    "> |   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"> |   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."> |   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"> |   8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#creating-and-passin
    g-registries"> | 
|   9 <script src="../../../../resources/testharness.js"></script> |   9 <script src="../../../../resources/testharness.js"></script> | 
|  10 <script src="../../../../resources/testharnessreport.js"></script> |  10 <script src="../../../../resources/testharnessreport.js"></script> | 
|  11 <script src="../testcommon.js"></script> |  11 <script src="../testcommon.js"></script> | 
|  12 <link rel="stylesheet" href="../../../../resources/testharness.css"> |  | 
|  13 </head> |  12 </head> | 
|  14 <body> |  13 <body> | 
|  15 <div id="log"></div> |  14 <div id="log"></div> | 
|  16 <script> |  15 <script> | 
|  17 testInIFrame('../resources/blank.html', function(doc) { |  16 testInIFrame('../resources/blank.html', function(doc) { | 
|  18     try { |  17     try { | 
|  19         doc.registerElement('x-element'); |  18         doc.registerElement('x-element'); | 
|  20     } catch (e) { |  19     } catch (e) { | 
|  21         assert_unreached('Unexpected exception, while registering a valid custom
     element'); |  20         assert_unreached('Unexpected exception, while registering a valid custom
     element'); | 
|  22     } |  21     } | 
|  23 }, 'Document, loaded into browsing context, must have a new empty registry'); |  22 }, 'Document, loaded into browsing context, must have a new empty registry'); | 
|  24  |  23  | 
|  25  |  24  | 
|  26 testInIFrame('../resources/blank.html', function(loadedDocument) { |  25 testInIFrame('../resources/blank.html', function(loadedDocument) { | 
|  27     var createdDocument = document.implementation.createHTMLDocument('Test Docum
    ent'); |  26     var createdDocument = document.implementation.createHTMLDocument('Test Docum
    ent'); | 
|  28     // Let's check that loadedDocument and createdDocument use different registe
    ries. |  27     // Let's check that loadedDocument and createdDocument use different registe
    ries. | 
|  29     createdDocument.registerElement('x-element'); |  28     createdDocument.registerElement('x-element'); | 
|  30     try { |  29     try { | 
|  31         loadedDocument.registerElement('x-element'); |  30         loadedDocument.registerElement('x-element'); | 
|  32     } catch (e) { |  31     } catch (e) { | 
|  33         assert_unreached('Unexpected exception while registering a custom elemen
    t ' + |  32         assert_unreached('Unexpected exception while registering a custom elemen
    t ' + | 
|  34             'in a document, which has it\'s own registry'); |  33             'in a document, which has it\'s own registry'); | 
|  35     } |  34     } | 
|  36 }, 'Document, loaded into browsing context, must have a new empty registry, ' + |  35 }, 'Document, loaded into browsing context, must have a new empty registry, ' + | 
|  37         'which is different from other documents\' registries'); |  36         'which is different from other documents\' registries'); | 
|  38 </script> |  37 </script> | 
|  39 </body> |  38 </body> | 
|  40 </html> |  39 </html> | 
| OLD | NEW |