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

Side by Side Diff: third_party/WebKit/LayoutTests/custom-elements/spec/insert-a-node-try-to-upgrade.html

Issue 2067853002: Upgrade custom elements when inserting a node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dominicc nits Created 4 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Custom Elements: Insert a node should try to upgrade</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="resources/custom-elements-helpers.js"></script>
6 <body>
7 <script>
8 'use strict';
9
10 // Insert a node
11 // https://dom.spec.whatwg.org/#concept-node-insert
12 // 6.5.2.2. try to upgrade inclusiveDescendant.
13 // Try to upgrade an element
14 // https://html.spec.whatwg.org/multipage/scripting.html#concept-try-upgrade
15 test_with_window(w => {
16 let element = w.document.createElement('a-a');
17
18 w.customElements.define('a-a', class extends w.HTMLElement {
19 constructor() {
20 super();
21 this.is_upgraded = true;
22 }
23 });
24 assert_false('is_upgraded' in element);
25 assert_false(element.matches(':defined'));
26
27 w.document.body.appendChild(element);
28 assert_true(element.is_upgraded);
29 assert_true(element.matches(':defined'));
30 }, 'Insert a node should try to upgrade');
31 </script>
32 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698