OLD | NEW |
---|---|
(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> | |
OLD | NEW |