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

Unified Diff: LayoutTests/fast/html/imports/import-custom-element-cycle.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/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>

Powered by Google App Engine
This is Rietveld 408576698