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

Side by Side Diff: LayoutTests/fast/dom/custom/callbacks-parsing.html

Issue 17707002: Implement Custom Elements inserted and removed callbacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <body>
5 <script>
6 t = async_test('parsing callbacks');
7 t.calls = [];
8
9 t.step(function () {
10 var proto = Object.create(HTMLElement.prototype);
11 proto.readyCallback = function () {
12 t.calls.push(this.id + ' ready');
13 };
14 proto.insertedCallback = function () {
15 t.calls.push(this.id + ' inserted');
16 };
17
18 var ctor = document.register('x-a', {prototype: proto});
19 });
20 </script>
21 <x-a id="a"></x-a>
22 <x-a id="b"></x-a>
23 <x-a id="c"></x-a>
24 <script>
25 t.step(function () {
26 assert_array_equals(t.calls, ['c ready', 'b ready', 'a ready', 'a inserted', 'b inserted', 'c inserted'], 'the callbacks should have been invoked at microta sk checkpoint');
27 t.done();
28 t = null;
29 });
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698