Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-step / debugger-step-out-custom-element-callbacks.html
blobe4363b8f850f5f008ec118127235850b17f720ae
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
7 function testFunction()
9 var proto = Object.create(HTMLElement.prototype);
10 proto.createdCallback = function createdCallback()
12 debugger;
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);
31 foo.remove();
34 function test()
36 InspectorTest.startDebuggerTest(step1, true);
38 function step1()
40 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
43 function step2()
45 var actions = [
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);
58 function step3()
60 InspectorTest.completeDebuggerTest();
64 </script>
65 </head>
67 <body onload="runTest()">
68 <p>
69 Tests stepping out from custom element callbacks.
70 </p>
71 </body>
72 </html>