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

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

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve most comments 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 <link id="import1" rel="import" href="resources/import-custom.html" />
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <x-x></x-x>
6 <script>
7 'use strict'
8
9 async_test((test) => {
10 window.onload = test.step_func_done(() => {
11 let reactions = [];
12 customElements.define('x-x', class extends HTMLElement {
13 constructor() {
14 super();
15 reactions.push({ type: 'constructor', element: this });
16 }
17 });
18
19 assert_equals(reactions.length, 2, 'Upgrade elements in master and import');
20
21 let elementsInMaster = document.querySelector('x-x');
22 let elementsInImport = import1.import.querySelector('x-x');
23
24 let elements = reactions.map(e => e.element);
25 assert_array_equals(elements, [elementsInImport, elementsInMaster],
26 'Upgrade elements in import should be done first.');
27 });
28 }, 'Test for Custom Element upgrade in imports');
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698