blob: 1886b4b0648ff13f102aae5d6f7028f6ba91cd93 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<link id="import1" rel="import" href="resources/import-custom.html">
<script>
'use strict';
test(() => {
let a = import1.import.querySelector('x-x');
assert_equals(Object.getPrototypeOf(a), HTMLElement.prototype,
'<x-x> should not have been upgreaded yet.');
import1.remove();
assert_equals(document.querySelector('link[rel=import]'), null,
'imported document should be detached');
customElements.define('x-x', class extends HTMLElement{});
assert_equals(Object.getPrototypeOf(a), HTMLElement.prototype,
'detached <x-x> should not have been upgreaded.');
}, 'custom elements in detached imports should not upgrade.');
</script>