Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/custom-elements/creating-and-passing-registries/share-registry-create-document.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698