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

Unified Diff: LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously.html

Issue 14711003: Custom Element constructors should synchronously invoke the ready callback (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously.html
diff --git a/LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously.html b/LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously.html
new file mode 100644
index 0000000000000000000000000000000000000000..eb475e7d5269fd5b70be6f994599578981d60398
--- /dev/null
+++ b/LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<script src="../../js/resources/js-test-pre.js"></script>
+<div id="container"></div>
+<script>
+description('Tests that custom element constructors run the readyCallback synchronously.');
+
+var proto = Object.create(HTMLElement.prototype);
+var ncallbacks = 0;
+proto.readyCallback = function () {
+ ncallbacks++;
+};
+var A = document.webkitRegister('x-a', {prototype: proto});
+var x = new A();
+shouldBe('ncallbacks', '1');
+
+successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/constructor-calls-ready-synchronously-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698