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

Side by Side Diff: LayoutTests/imported/web-platform-tests/custom-elements/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html

Issue 560893005: First checked-in import of the W3C's test suites. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add new expectations for newly failing w3c tests Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Document.createElement() and Document.createElementNS() create custom ele ment of type, specified by localName argument</title>
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
6 <meta name="assert" content="If an element definition with matching localName, n amespace, and TYPE is not registered with token's document, set TYPE to localNam e">
7 <link rel="help" href="http://www.w3.org/TR/custom-elements/#extensions-to-docum ent-interface-to-instantiate">
8 <script src="../../../../../resources/testharness.js"></script>
9 <script src="../../../../../resources/testharnessreport.js"></script>
10 <script src="../../testcommon.js"></script>
11 <link rel="stylesheet" href="../../../../../resources/testharness.css">
12 </head>
13 <body>
14 <div id="log"></div>
15 <script>
16 test(function() {
17 var doc = newHTMLDocument();
18 var name1 = 'x-a';
19 var name2 = 'x-b';
20 var GeneratedConstructor = doc.registerElement(name1);
21 var customElement = doc.createElement(name1, name2);
22
23 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.pro totype,
24 'Custom element type should be the local name of the custom element');
25 }, 'Test Document.createElement() creates custom element of type, ' +
26 'specified by localName argument, if an element definition with matching loc alName, ' +
27 'namespace, and type is not registered');
28
29
30 test(function() {
31 var doc = newHTMLDocument();
32 var name1 = 'x-c';
33 var name2 = 'x-d';
34 var GeneratedConstructor = doc.registerElement(name1);
35 var customElement = doc.createElementNS(HTML_NAMESPACE, name1, name2);
36
37 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.pro totype,
38 'Custom element type should be the local name of the custom element');
39 }, 'Test Document.createElementNS() creates custom element of type, ' +
40 'specified by localName argument, if an element definition with matching ' +
41 'localName, namespace, and type is not registered');
42 </script>
43 </body>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698