Index: LayoutTests/fast/html/imports/import-custom-element-cycle.html |
diff --git a/LayoutTests/fast/html/imports/import-custom-element-cycle.html b/LayoutTests/fast/html/imports/import-custom-element-cycle.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6b536ae5a20d36663512aa8fe0d4064ab1605e94 |
--- /dev/null |
+++ b/LayoutTests/fast/html/imports/import-custom-element-cycle.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<script src="../../../http/tests/htmlimports/resources/import-custom-element-helper.js"></script> |
+</head> |
+<body> |
+<script> |
+var Hello = registerTestingCustomElement('x-hello'); |
+ |
+var numberOfLinks = 1; |
+var t1 = async_test('Elements are upgraded ignoring the cycle.'); |
+var t2 = async_test('Elements are resolved ignoring the cycle.'); |
+var latch = new ImportTestLatch(function() { |
+ t1.step(function() { |
+ assert_array_equals(['hello-cycle-p1', 'hello-cycle-1', 'hello-cycle-2', 'hello-cycle-p2'], Hello.ids); |
+ t1.done(); |
+ }); |
+ |
+ t2.step(function() { |
+ var Bye = registerTestingCustomElement('x-bye'); |
+ assert_array_equals(['bye-cycle-p1', 'bye-cycle-1', 'bye-cycle-2', 'bye-cycle-p2'], Bye.ids); |
+ t2.done(); |
+ }); |
+}, numberOfLinks); |
+</script> |
+<link rel="import" href="resources/custom-element-hello-cycle-parent.html" onload="latch.loaded()"> |
+</body> |
+</html> |