| Index: LayoutTests/fast/dom/custom/document-register-on-create-callback.html
|
| diff --git a/LayoutTests/fast/dom/custom/document-register-on-create-callback.html b/LayoutTests/fast/dom/custom/document-register-on-create-callback.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b55484c42f1b1ac349d5e037429293f01724b893
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/custom/document-register-on-create-callback.html
|
| @@ -0,0 +1,27 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +<script>
|
| +description('document.register() in a createdCallback should upgrade elements that are in the same processing queue.');
|
| +
|
| +var createdElements = [];
|
| +
|
| +var protoA = Object.create(HTMLElement.prototype);
|
| +protoA.createdCallback = function () {
|
| + createdElements.push(this.id);
|
| + var protoB = Object.create(HTMLElement.prototype);
|
| + protoB.createdCallback = function () {
|
| + createdElements.push(this.id);
|
| + };
|
| +
|
| + document.register('x-b', {prototype: protoB});
|
| + shouldBe('createdElements', '["elemA0", "elemB0"]');
|
| +};
|
| +
|
| +document.register('x-a', {prototype: protoA});
|
| +</script>
|
| +<x-b id='elemB0'></x-b>
|
| +<x-a id='elemA0'></x-a>
|
| +<x-b id='elemB1'></x-b>
|
| +<script>
|
| +shouldBe('createdElements', '["elemA0", "elemB0", "elemB1"]');
|
| +</script>
|
|
|