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

Side by Side Diff: LayoutTests/fast/dom/custom/callback-timing.html

Issue 839673004: Test that custom element callback fires before DOMContentLoaded event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/callback-timing-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <script src='../../../resources/js-test.js'></script>
2 <x-foo></x-foo>
3 <script>
4 description('Ensure that custom element callback fires before DOMContentLoaded e vent');
5
6 var eventlog = [];
7
8 addEventListener('DOMContentLoaded', function(e) {
9 eventlog.push('DOMContentLoaded event');
10 });
11 addEventListener('load', function(e) {
12 eventlog.push('load event');
13
14 shouldBe("eventlog[0]", "'created x-foo'");
15 shouldBe("eventlog[1]", "'DOMContentLoaded event'");
16 shouldBe("eventlog[2]", "'load event'");
17 });
18 var proto = Object.create(HTMLElement.prototype);
19 proto.createdCallback = function() {
20 eventlog.push('created ' + this.localName);
21 };
22 document.registerElement('x-foo', {prototype: proto});
23 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/callback-timing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698