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

Side by Side Diff: LayoutTests/fast/dom/custom/document-register-on-create-callback.html

Issue 106903007: Let unresolved custom element go through CustomElementCallbackQueue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated. Created 7 years 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/js-test.js"></script>
dominicc (has gone to gerrit) 2013/12/18 08:46:41 Can we use the W3C test harness for this?
3 <script>
4 description("document.register() in a createdCallback should upgrade elements th at are in the same processing queue.");
dominicc (has gone to gerrit) 2013/12/18 08:46:41 I think it is preferable to use single quotes for
Hajime Morrita 2013/12/19 05:06:59 Done.
5
6 var createdElements = [];
7
8 var protoA = Object.create(HTMLElement.prototype);
9 protoA.createdCallback = function () {
10 createdElements.push(this.id);
11 var protoB = Object.create(HTMLElement.prototype);
12 protoB.createdCallback = function () {
13 createdElements.push(this.id);
14 };
15
16 document.register('x-b', {prototype: protoB});
17 shouldBe("createdElements", "['elemA0', 'elemB0']");
dominicc (has gone to gerrit) 2013/12/18 08:46:41 Same here, use ' for the outermost string literal.
Hajime Morrita 2013/12/19 05:06:59 Done.
18 };
19
20 document.register('x-a', {prototype: protoA});
21 </script>
22 <x-b id=elemB0></x-b>
dominicc (has gone to gerrit) 2013/12/18 08:46:41 Quote these attributes for consistency.
Hajime Morrita 2013/12/19 05:06:59 Done.
23 <x-a id=elemA0></x-a>
24 <x-b id=elemB1></x-b>
25 <script>
26 shouldBe("createdElements", "['elemA0', 'elemB0', 'elemB1']");
dominicc (has gone to gerrit) 2013/12/18 08:46:41 And here.
Hajime Morrita 2013/12/19 05:06:59 Done.
27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698