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

Side by Side Diff: LayoutTests/fast/dom/custom/registration-context-delete-during-callback-recursion.html

Issue 18789002: Implement Custom Elements' attributeChangedCallback. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../js/resources/js-test-pre.js"></script> 2 <script src="../../js/resources/js-test-pre.js"></script>
3 <script src="testutils.js"></script> 3 <script src="testutils.js"></script>
4 <body> 4 <body>
5 <x-a></x-a> 5 <div id="s">
6 <x-a></x-a> 6 </div>
7 <x-a></x-a>
8 <script> 7 <script>
9 if (fork()) { 8 if (fork()) {
10 // The controlling parent frame 9 // The controlling parent frame
11 description('Tests destroying a context during element upgrade.'); 10 description('Tests destroying a context during attributeChanged callback.');
12 jsTestIsAsync = true; 11 jsTestIsAsync = true;
13 successfullyParsed = true; 12 successfullyParsed = true;
14 } else { 13 } else {
15 // The child frame 14 // The child frame
16 15
17 var n = 0; 16 var n = 0;
18 var proto = Object.create(HTMLElement.prototype); 17 var proto = Object.create(HTMLElement.prototype);
19 proto.createdCallback = function () { 18 proto.createdCallback = function () {
20 if (++n == 2) 19 if (n++ == 2)
20 this.nextSibling.setAttribute('tick', '...');
21 };
22 proto.attributeChangedCallback = function (name) {
23 if (name == 'tick')
24 this.nextSibling.setAttribute('boom', 'tsk');
25 if (name == 'boom')
21 destroyContext(); 26 destroyContext();
22 }; 27 };
23 28
24 var A = document.register('x-a', {prototype: proto}); 29 var A = document.register('x-a', {prototype: proto});
25 new A(); 30 s.innerHTML =
31 '<x-a id="t"></x-a>' +
32 '<x-a id="u"></x-a>' +
33 '<x-a id="v"></x-a>' +
34 '<x-a id="w"></x-a>';
35
26 done(); 36 done();
27 } 37 }
28 </script> 38 </script>
29 <script src="../../js/resources/js-test-post.js"></script> 39 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698