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

Side by Side Diff: third_party/WebKit/LayoutTests/custom-elements/imports/upgrade-order.html

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up tests, remove redundant cases Created 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5 'use strict';
6
7 let reactions = [];
8 </script>
9 <x-x id="a"></x-x>
10 <y-y id="x"></y-y>
11 <link id="import1" rel="import" href="resources/upgrade.html">
12 <x-x id="b"></x-x>
13 <y-y id="y"></y-y>
14 <script>
15 'use strict'
16
17 async_test((test) => {
18 window.onload = test.step_func_done(() => {
19 customElements.define('y-y', class extends HTMLElement {
20 constructor() {
21 super();
tkent 2016/08/24 12:07:20 wrong indentation.
kochi 2016/08/24 15:36:51 Done.
22 reactions.push({ type: 'constructor', element: this });
23 }
24 });
25
26 let elements = reactions.map(e => e.element.id);
27 assert_array_equals(elements, ['a', 'aa', 'b', 'x', 'bb', 'y']);
28 }, 'Upgrade of custom elements should happen in document order.');
29 });
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698