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

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

Issue 18789002: Implement Custom Elements' attributeChangedCallback. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Sync to tip. 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 <x-a></x-a>
6 <x-a></x-a>
7 <x-a></x-a>
8 <script> 6 <script>
9 if (fork()) { 7 if (fork()) {
10 // The controlling parent frame 8 // The controlling parent frame
11 description('Tests destroying a context during element upgrade.'); 9 description('Tests destroying a context during attributeChanged callback.');
12 jsTestIsAsync = true; 10 jsTestIsAsync = true;
13 successfullyParsed = true; 11 successfullyParsed = true;
14 } else { 12 } else {
15 // The child frame 13 // The child frame
16 14
17 var n = 0;
18 var proto = Object.create(HTMLElement.prototype); 15 var proto = Object.create(HTMLElement.prototype);
19 proto.createdCallback = function () { 16 proto.attributeChangedCallback = function () {
20 if (++n == 2) 17 destroyContext();
21 destroyContext();
22 }; 18 };
23 19
24 var A = document.register('x-a', {prototype: proto}); 20 var A = document.register('x-a', {prototype: proto});
25 new A(); 21 var a = new A();
22 a.id = 'boom';
26 done(); 23 done();
27 } 24 }
28 </script> 25 </script>
29 <script src="../../js/resources/js-test-post.js"></script> 26 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698