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

Side by Side Diff: LayoutTests/fast/html/imports/import-custom-element-in-master-and-grandchild.html

Issue 249563003: REGRESSION(r171966): Custom elements in async imports don't get upgrade. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script>
6 <script src="../../../http/tests/htmlimports/resources/import-custom-element-hel per.js"></script>
7 </head>
8 <body>
9 <script>
10 var Hello = registerTestingCustomElement('x-hello');
11 var numberOfLinks = 1;
12 var t1 = async_test('Custom elements in an indirect import and the master are bo th upgraded.');
13 var t2 = async_test('Custom elements in an indirect import and the master are bo th resolved.');
14 var latch = new ImportTestLatch(function() {
15 // FIXME(crbug.com/366877): Need another cycle to ensure microtasks are perf ormed.
16 setTimeout(function() {
dominicc (has gone to gerrit) 2014/04/28 01:32:32 Do you do this everywhere? Maybe it makes sense to
Hajime Morrita 2014/04/29 23:11:37 Ok, done.
17 t1.step(function() {
18 assert_array_equals(['hello-1', 'hello-2', 'hello-root-1', 'hello-ro ot-2'], Hello.ids.slice(0).sort());
19 Hello.ids.splice(Hello.ids.indexOf('hello-2')); // Remove an asynchr onously loaded element.
20 assert_array_equals(['hello-root-1', 'hello-1', 'hello-root-2'], Hel lo.ids);
21 t1.done();
22 }, 0);
23
24 t2.step(function() {
25 var Bye = registerTestingCustomElement('x-bye');
26 assert_array_equals(['bye-1', 'bye-2', 'bye-root-1', 'bye-root-2'], Bye.ids.slice(0).sort());
27 Bye.ids.splice(Bye.ids.indexOf('bye-2')); // Remove an asynchronousl y loaded element.
28 assert_array_equals(['bye-root-1', 'bye-1', 'bye-root-2'], Bye.ids);
29 t2.done();
30 });
31 }, 0);
32 }, numberOfLinks);
33 </script>
34 <x-hello id="hello-root-1"></x-hello>
35 <x-bye id="bye-root-1"></x-bye>
36 <link rel="import" href="resources/custom-element-hello-parent-12.html" onload=" latch.loaded()">
37 <x-hello id="hello-root-2"></x-hello>
38 <x-bye id="bye-root-2"></x-bye>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698