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

Side by Side Diff: third_party/WebKit/LayoutTests/custom-elements/spec/adopt-node.html

Issue 2170383002: CustomElements: adopt node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge conflict resolution Created 4 years, 4 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/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js » ('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: adopt node</title>
3 <link rel="help" href="https://dom.spec.whatwg.org/#concept-node-adopt">
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <script src="resources/custom-elements-helpers.js"></script>
7 <body>
8 <script>
9 'use strict'
10
11 // 3.2 For each inclusiveDescendant in node’s shadow-including inclusive descend ants that is a custom
12 // element, enqueue a custom element callback reaction with inclusiveDescendant,
13 // callback name "adoptedCallback", and an empty argument list.
14 promise_test((t) => {
15 return Promise.all([
16 create_window_in_test(t),
17 create_window_in_test(t)])
18 .then(([w1, w2]) => {
19 let invocations = [];
20 class X extends w1.HTMLElement {
21 adoptedCallback() { invocations.push(['adopted', this, []]); }
22 }
23 w1.customElements.define('a-a', X);
24 let a = w1.document.createElement('a-a');
25 w2.document.adoptNode(a);
26 assert_array_equals_callback_invocations(invocations, [ ['adopted', a, []] ]);
27 });
28 }, 'adopting a custom element to the different document should enqueue an adopte dCallback reaction');
29 </script>
30 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698