| Index: LayoutTests/fast/dom/custom/registration-context-delete-during-callback-recursion.html
|
| diff --git a/LayoutTests/fast/dom/custom/registration-context-delete-during-upgrade.html b/LayoutTests/fast/dom/custom/registration-context-delete-during-callback-recursion.html
|
| similarity index 52%
|
| copy from LayoutTests/fast/dom/custom/registration-context-delete-during-upgrade.html
|
| copy to LayoutTests/fast/dom/custom/registration-context-delete-during-callback-recursion.html
|
| index e740ef2759eda99d4effc3508d785c0bab1e2fb9..356855884645d45f653344700098e928666b30d9 100644
|
| --- a/LayoutTests/fast/dom/custom/registration-context-delete-during-upgrade.html
|
| +++ b/LayoutTests/fast/dom/custom/registration-context-delete-during-callback-recursion.html
|
| @@ -2,13 +2,12 @@
|
| <script src="../../js/resources/js-test-pre.js"></script>
|
| <script src="testutils.js"></script>
|
| <body>
|
| -<x-a></x-a>
|
| -<x-a></x-a>
|
| -<x-a></x-a>
|
| +<div id="s">
|
| +</div>
|
| <script>
|
| if (fork()) {
|
| // The controlling parent frame
|
| - description('Tests destroying a context during element upgrade.');
|
| + description('Tests destroying a context during attributeChanged callback.');
|
| jsTestIsAsync = true;
|
| successfullyParsed = true;
|
| } else {
|
| @@ -17,12 +16,23 @@ if (fork()) {
|
| var n = 0;
|
| var proto = Object.create(HTMLElement.prototype);
|
| proto.createdCallback = function () {
|
| - if (++n == 2)
|
| + if (n++ == 2)
|
| + this.nextSibling.setAttribute('tick', '...');
|
| + };
|
| + proto.attributeChangedCallback = function (name) {
|
| + if (name == 'tick')
|
| + this.nextSibling.setAttribute('boom', 'tsk');
|
| + if (name == 'boom')
|
| destroyContext();
|
| };
|
|
|
| var A = document.register('x-a', {prototype: proto});
|
| - new A();
|
| + s.innerHTML =
|
| + '<x-a id="t"></x-a>' +
|
| + '<x-a id="u"></x-a>' +
|
| + '<x-a id="v"></x-a>' +
|
| + '<x-a id="w"></x-a>';
|
| +
|
| done();
|
| }
|
| </script>
|
|
|