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

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

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses tkent's comments. Created 4 years, 3 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 <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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698