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

Unified Diff: LayoutTests/http/tests/htmlimports/import-custom-element-order.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 side-by-side diff with in-line comments
Download patch
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..00c93f8f9663cbdb2085bfba59471f79e616690c
--- /dev/null
+++ b/LayoutTests/http/tests/htmlimports/import-custom-element-order.html
@@ -0,0 +1,37 @@
+<!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 numberOfLinks = 2;
+var t1 = async_test('Custom elements in async imports wait preceeding sync import before upgraded.');
+var t2 = async_test('Custom elements in async imports wait preceeding sync import before resolved.');
+
+var latch = new ImportTestLatch(function() {
+ window.setTimeout(function() {
+ t1.step(function() {
+ assert_array_equals(['hello-slow', 'hello-1', 'hello-2'], Hello.ids);
+ t1.done();
+ });
+
+ t2.step(function() {
+ var Bye = registerTestingCustomElement('x-bye');
+ assert_array_equals(['bye-slow', 'bye-1', 'bye-2'], Bye.ids);
+ t2.done();
+ });
+ }, 0);
+}, numberOfLinks);
+</script>
+</head>
+<body>
+<link rel=import href="resources/import-slow-custom-element-hello.cgi" onload="latch.loaded()">
+<link rel=import async href="resources/import-custom-element-hello-1.html" onload="latch.loaded()">
+<x-hello id="hello-2"></x-hello>
+<x-bye id="bye-2"></x-bye>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698