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

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

Issue 2132343002: Make Custom Elements V1 work in HTML imports documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: imports-create tests checks the order of constructors Created 4 years, 5 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 setup({ explicit_done: true });
9 window.onload = function () {
10 let reactions = [];
11 customElements.define('x-x', class extends HTMLElement {
12 constructor() {
13 super();
14 reactions.push({ type: 'constructor', element: this });
15 }
16 });
17
18 test(() => {
19 assert_equals(reactions.length, 2);
20 }, 'Upgrade elements in master and import');
21
22 let elementsInMaster = document.getElementsByTagName('x-x');
23 let elementsInImport = import1.import.getElementsByTagName('x-x');
24 test(() => {
25 assert_equals(reactions[0].element, elementsInImport[0]);
dominicc (has gone to gerrit) 2016/07/19 01:57:39 This test would be more descriptive if it had <x-
26 assert_equals(reactions[1].element, elementsInMaster[0]);
27 }, 'Upgrade elements in import first');
28
29 done();
30 };
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698