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

Unified Diff: LayoutTests/fast/html/imports/import-custom-element-onload.html

Issue 259503007: Flush microtask before event handlers are invoked (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added an expected.txt file. 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-onload.html
diff --git a/LayoutTests/fast/html/imports/import-custom-element-onload.html b/LayoutTests/fast/html/imports/import-custom-element-onload.html
new file mode 100644
index 0000000000000000000000000000000000000000..3042d2e7c87fd1a7838a8d2c014d5af173778efd
--- /dev/null
+++ b/LayoutTests/fast/html/imports/import-custom-element-onload.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script>
+hello = Object.create(HTMLElement.prototype);
+hello.ids = [];
+hello.createdCallback = function() {
+ hello.ids.push(this.id);
+};
+
+document.registerElement('x-hello', {prototype: hello});
+
+t = async_test('Custom elements are upgraded when onload is called.');
dominicc (has gone to gerrit) 2014/04/25 02:14:50 This isn't clear; use "should be" instead of "are"
+
+function ready()
+{
dominicc (has gone to gerrit) 2014/04/25 02:14:50 Again, I think this brace goes on the previous lin
+ t.step(function() {
+ assert_array_equals(["1", "2", "3"], hello.ids);
dominicc (has gone to gerrit) 2014/04/25 02:14:50 Stick to one kind of quote character for string li
+ t.done();
+ });
+}
+</script>
+<link rel="import" href="resources/import-custom-element-onload-child.html" onload="ready()">
+</head>
+<body>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698