| Index: third_party/WebKit/LayoutTests/custom-elements/imports/detached-import.html
|
| diff --git a/third_party/WebKit/LayoutTests/custom-elements/imports/detached-import.html b/third_party/WebKit/LayoutTests/custom-elements/imports/detached-import.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1886b4b0648ff13f102aae5d6f7028f6ba91cd93
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/custom-elements/imports/detached-import.html
|
| @@ -0,0 +1,21 @@
|
| +<!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>
|
|
|