Index: LayoutTests/fast/dom/custom/callbacks-parsing.html |
diff --git a/LayoutTests/fast/dom/custom/callbacks-parsing.html b/LayoutTests/fast/dom/custom/callbacks-parsing.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..318b0db81f03fcae8396ee64a34b958d7701323f |
--- /dev/null |
+++ b/LayoutTests/fast/dom/custom/callbacks-parsing.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<body> |
+<script> |
+t = async_test('parsing callbacks'); |
+t.calls = []; |
+ |
+t.step(function () { |
+ var proto = Object.create(HTMLElement.prototype); |
+ proto.readyCallback = function () { |
+ t.calls.push(this.id + ' ready'); |
+ }; |
+ proto.insertedCallback = function () { |
+ t.calls.push(this.id + ' inserted'); |
+ }; |
+ |
+ var ctor = document.register('x-a', {prototype: proto}); |
+}); |
+</script> |
+<x-a id="a"></x-a> |
+<x-a id="b"></x-a> |
+<x-a id="c"></x-a> |
+<script> |
+t.step(function () { |
+ assert_array_equals(t.calls, ['c ready', 'b ready', 'a ready', 'a inserted', 'b inserted', 'c inserted'], 'the callbacks should have been invoked at microtask checkpoint'); |
+ t.done(); |
+ t = null; |
+}); |
+</script> |