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

Side by Side Diff: LayoutTests/imported/web-platform-tests/custom-elements/instantiating-custom-elements/custom-element-type-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>Instantiation of custom element: custom element type is given via the loc al name of the custom element</title>
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
6 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru ">
7 <meta name="assert" content="The custom element type is given to a custom elemen t at the time of its instantation in one of the two ways: 1. As the local name o f the custom element.">
8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#instantiating-custo m-elements">
9 <script src="../../../../resources/testharness.js"></script>
10 <script src="../../../../resources/testharnessreport.js"></script>
11 <script src="../testcommon.js"></script>
12 <link rel="stylesheet" href="../../../../resources/testharness.css">
13 </head>
14 <body>
15 <div id="log"></div>
16 <script>
17 test(function() {
18 var doc = newHTMLDocument();
19 var GeneratedConstructor = doc.registerElement('x-a');
20 doc.body.innerHTML = '<x-a id="x-a"></x-a>';
21 var customElement = doc.querySelector('#x-a');
22 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.pro totype,
23 'Custom element type should be the type, specified by the local name of ' +
24 'the custom element');
25 }, 'Test custom element type, which is given via the local name of the custom el ement. ' +
26 'Custom element created via innerHTML property');
27
28
29 testInIFrame('../resources/x-element.html', function(doc) {
30 var GeneratedConstructor = doc.registerElement('x-element');
31 var xelement = doc.querySelector('#x-element');
32 assert_equals(Object.getPrototypeOf(xelement), GeneratedConstructor.prototyp e,
33 'Custom element type should be the type, specified by the local name of ' +
34 'the custom element');
35 }, 'Test custom element type, which is given via the local name of the custom el ement. ' +
36 'Custom element is defined in loaded HTML document');
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698