3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
7 function testFunction()
9 var proto
= Object
.create(HTMLElement
.prototype);
10 proto
.createdCallback
= function createdCallback()
13 output('Invoked createdCallback.');
15 proto
.attachedCallback
= function attachedCallback()
17 output('Invoked attachedCallback.');
19 proto
.detachedCallback
= function detachedCallback()
21 output('Invoked detachedCallback.');
23 proto
.attributeChangedCallback
= function attributeChangedCallback()
25 output('Invoked attributeChangedCallback.');
27 var FooElement
= document
.registerElement('x-foo', { prototype: proto
});
28 var foo
= new FooElement();
29 foo
.setAttribute('a', 'b');
30 document
.body
.appendChild(foo
);
36 InspectorTest
.startDebuggerTest(step1
, true);
40 InspectorTest
.runTestFunctionAndWaitUntilPaused(step2
);
46 "Print", // debugger; in createdCallback
47 "StepOut", "Print", // at foo.setAttribute()
48 "StepInto", "StepInto", "Print", // at attributeChangedCallback
49 "StepOut", "Print", // at document.body.appendChild()
50 "StepInto", "StepInto", "Print", // at attachedCallback
51 "StepOut", "Print", // at foo.remove()
52 "StepInto", "StepInto", "Print", // at detachedCallback
53 "StepOut", "Print", // at testFunction() return point
55 InspectorTest
.waitUntilPausedAndPerformSteppingActions(actions
, step3
);
60 InspectorTest
.completeDebuggerTest();
67 <body onload=
"runTest()">
69 Tests stepping out from custom element callbacks.