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

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

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase wip Created 4 years, 4 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 rel="import" href="resources/async-component.html" async>
5 <async-component></async-component>
6 <script>
7 'use strict';
8
9 promise_test(() => {
10 return customElements.whenDefined('async-component').then(() => {
11 let el = document.querySelector('async-component');
12 assert_true(el instanceof AsyncComponent, 'async-component should be custom' );
dominicc (has gone to gerrit) 2016/08/19 04:54:10 "be custom" is a bit vague; can you be more specif
kochi 2016/08/19 10:51:47 I rewrote where appropriate, but "be custom" is ok
13
14 let link = document.querySelector('link[rel=import]');
15 let elInImport = link.import.querySelector('async-component');
16 assert_true(elInImport instanceof AsyncComponent, 'async-component in import should be custom');
17 });
18 }, 'Custom Elements v1 definition in async import should work.');
dominicc (has gone to gerrit) 2016/08/19 04:54:10 Just refer to these as "custom elements"; not "v1.
kochi 2016/08/19 10:51:47 Done.
19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698