Chromium Code Reviews| Index: LayoutTests/http/tests/htmlimports/import-custom-element-order.html |
| diff --git a/LayoutTests/http/tests/htmlimports/import-custom-element-order.html b/LayoutTests/http/tests/htmlimports/import-custom-element-order.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..477c33272e8efddb6f40b3eaf4c914f030f958cb |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/htmlimports/import-custom-element-order.html |
| @@ -0,0 +1,36 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<script src="resources/import-custom-element-helper.js"></script> |
| +<script> |
| + |
| + |
| +var Hello = registerTestingCustomElement('x-hello'); |
| +var t1 = async_test('Custom element in async imports wait preceeding sync import before upgraded.'); |
| +var t2 = async_test('Custom element in async imports wait preceeding sync import before resolved.'); |
| + |
| +function ready() { |
| + window.setTimeout(function() { |
| + t1.step(function() { |
| + assert_array_equals(['hello-slow', 'hello-2', 'hello-1'], Hello.ids); |
| + t1.done(); |
| + }); |
| + |
| + t2.step(function() { |
| + var Bye = registerTestingCustomElement('x-bye'); |
| + assert_array_equals(['bye-slow', 'bye-2', 'bye-1'], Bye.ids); |
| + t2.done(); |
| + }); |
| + }, 0); |
| +} |
| +</script> |
| +</head> |
| +<body> |
| +<link rel=import href="resources/import-slow-custom-element-hello.cgi"> |
| +<link rel=import async href="resources/import-custom-element-hello-1.html" onload="ready()"> |
|
dominicc (has gone to gerrit)
2014/04/28 01:32:32
There's another test where you use the latch with
Hajime Morrita
2014/04/29 23:11:37
No, this one was just outdated. Will update to use
|
| +<x-hello id="hello-2"></x-hello> |
| +<x-bye id="bye-2"></x-bye> |
| +</body> |
| +</html> |