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

Unified Diff: LayoutTests/fast/html/imports/resources/import-custom-element-helper.js

Issue 249563003: REGRESSION(r171966): Custom elements in async imports don't get upgrade. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added and revised tests 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/resources/import-custom-element-helper.js
diff --git a/LayoutTests/fast/html/imports/resources/import-custom-element-helper.js b/LayoutTests/fast/html/imports/resources/import-custom-element-helper.js
new file mode 100644
index 0000000000000000000000000000000000000000..1f712beec7963d3e84d671d253b4c785b25a9352
--- /dev/null
+++ b/LayoutTests/fast/html/imports/resources/import-custom-element-helper.js
@@ -0,0 +1,17 @@
+
+function registerTestingCustomElement(tagName) {
+ var definition = function() {};
+ definition.ids = [];
+ definition.prototype = Object.create(HTMLElement.prototype);
+ definition.prototype.createdCallback = function() { definition.ids.push(this.id); }
+ document.registerElement(tagName, definition);
+ return definition;
dominicc (has gone to gerrit) 2014/04/25 02:39:45 Why not just set up the prototype and return the g
+}
+
+function ImportTestLatch(test, count) {
+ this.loaded = function() {
+ count--;
+ if (!count)
+ test();
+ };
+}

Powered by Google App Engine
This is Rietveld 408576698