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

Side by Side Diff: LayoutTests/fast/html/imports/import-custom-element-dup-resolve.html

Issue 272243004: HTML Imports: Fix race conditions on HTMLImportsChild (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/testharness.js"></script> 4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script> 5 <script src="../../../resources/testharnessreport.js"></script>
6 <script src="../../../http/tests/htmlimports/resources/import-custom-element-hel per.js"></script> 6 <script src="../../../http/tests/htmlimports/resources/import-custom-element-hel per.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <script> 9 <script>
10 var Hello = registerTestingCustomElement('x-hello'); 10 var Hello = registerTestingCustomElement('x-hello');
11 11
12 var numberOfLinks = 6; 12 var numberOfLinks = 10;
13 var t1 = async_test('Instantiate custom elements in async imports.'); 13 var t1 = async_test('Instantiate custom elements in async imports.');
14 var t2 = async_test('Resolve custom elements in async imports later.'); 14 var t2 = async_test('Resolve custom elements in async imports later.');
15 var latch = new ImportTestLatch(function() { 15 var latch = new ImportTestLatch(function() {
16 t1.step(function() { 16 t1.step(function() {
17 assert_array_equals(['hello-3', 'hello-4', 'hello-5', 'hello-6', 'hello- p34-1', 'hello-p34-2', 'hello-p56-1', 'hello-p56-2'], Hello.ids.slice(0).sort(), 'All elements are upgraded only once'); 17 assert_array_equals(['hello-3', 'hello-4', 'hello-5', 'hello-6', 'hello- p34-1', 'hello-p34-2', 'hello-p56-1', 'hello-p56-2'], Hello.ids.slice(0).sort(), 'All elements are upgraded only once');
18 // Remove async links whose loading orders aren't deterministic. 18 // Remove async links whose loading orders aren't deterministic.
19 Hello.ids.splice(Hello.ids.indexOf('hello-4'), 1); 19 Hello.ids.splice(Hello.ids.indexOf('hello-4'), 1);
20 Hello.ids.splice(Hello.ids.indexOf('hello-6'), 1); 20 Hello.ids.splice(Hello.ids.indexOf('hello-6'), 1);
21 assert_array_equals(['hello-p34-1', 'hello-3', 'hello-p34-2', 'hello-5', 'hello-p56-1', 'hello-p56-2'], Hello.ids, 'Elements from non async improts are upgraded in order'); 21 assert_array_equals(['hello-p34-1', 'hello-3', 'hello-p34-2', 'hello-5', 'hello-p56-1', 'hello-p56-2'], Hello.ids, 'Elements from non async improts are upgraded in order');
22 t1.done(); 22 t1.done();
(...skipping 11 matching lines...) Expand all
34 }, numberOfLinks); 34 }, numberOfLinks);
35 </script> 35 </script>
36 <link rel="import" href="resources/custom-element-hello-parent-34.html" onload=" latch.loaded()"> 36 <link rel="import" href="resources/custom-element-hello-parent-34.html" onload=" latch.loaded()">
37 <link rel="import" href="resources/custom-element-hello-3.html" onload="latch.lo aded()"> 37 <link rel="import" href="resources/custom-element-hello-3.html" onload="latch.lo aded()">
38 <link rel="import" href="resources/custom-element-hello-4.html" async onload="la tch.loaded()"> 38 <link rel="import" href="resources/custom-element-hello-4.html" async onload="la tch.loaded()">
39 <link rel="import" href="resources/custom-element-hello-5.html" onload="latch.lo aded()"> 39 <link rel="import" href="resources/custom-element-hello-5.html" onload="latch.lo aded()">
40 <link rel="import" href="resources/custom-element-hello-6.html" async onload="la tch.loaded()"> 40 <link rel="import" href="resources/custom-element-hello-6.html" async onload="la tch.loaded()">
41 <link rel="import" href="resources/custom-element-hello-parent-56.html" onload=" latch.loaded()"> 41 <link rel="import" href="resources/custom-element-hello-parent-56.html" onload=" latch.loaded()">
42 </body> 42 </body>
43 </html> 43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698