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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/parser/parser-constructs-custom-element-in-document-write.html

Issue 2434563008: Import wpt@26c8d4e87448d1c4e5ebf2ddb4917c0633c201db (Closed)
Patch Set: Mark one more test as potentially timing out Created 4 years, 1 month 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Custom Elements: Changes to the HTML parser</title>
5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
6 <meta name="assert" content="HTML parser must construct custom elements inside d ocument.write">
7 <link rel="help" href="https://html.spec.whatwg.org/#create-an-element-for-the-t oken">
8 <link rel="help" href="https://dom.spec.whatwg.org/#concept-create-element">
9 <link rel="help" href="https://html.spec.whatwg.org/#document.write()">
10 <script src="/resources/testharness.js"></script>
11 <script src="/resources/testharnessreport.js"></script>
12 </head>
13 <body>
14 <div id="log"></div>
15 <script>
16
17 class MyCustomElement extends HTMLElement { }
18 customElements.define('my-custom-element', MyCustomElement);
19
20 document.write('<my-custom-element></my-custom-element>');
21
22 test(function () {
23 var instance = document.querySelector('my-custom-element');
24
25 assert_true(instance instanceof HTMLElement);
26 assert_true(instance instanceof MyCustomElement);
27
28 }, 'HTML parser must instantiate custom elements inside document.write');
29
30 </script>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698