OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <link id="import1" rel="import" href="resources/import-custom.html"> |
| 5 <script> |
| 6 'use strict'; |
| 7 |
| 8 test(() => { |
| 9 let a = import1.import.querySelector('x-x'); |
| 10 assert_equals(Object.getPrototypeOf(a), HTMLElement.prototype, |
| 11 '<x-x> should not have been upgreaded yet.'); |
| 12 |
| 13 import1.remove(); |
| 14 assert_equals(document.querySelector('link[rel=import]'), null, |
| 15 'imported document should be detached'); |
| 16 |
| 17 customElements.define('x-x', class extends HTMLElement{}); |
| 18 assert_equals(Object.getPrototypeOf(a), HTMLElement.prototype, |
| 19 'detached <x-x> should not have been upgreaded.'); |
| 20 }, 'custom elements in detached imports should not upgrade.'); |
| 21 </script> |
OLD | NEW |