| OLD | NEW |
| (Empty) |
| 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> | |
| 6 | |
| 7 function testFunction() | |
| 8 { | |
| 9 var proto = Object.create(HTMLElement.prototype); | |
| 10 proto.createdCallback = function createdCallback() | |
| 11 { | |
| 12 debugger; | |
| 13 output('Invoked createdCallback.'); | |
| 14 }; | |
| 15 proto.attachedCallback = function attachedCallback() | |
| 16 { | |
| 17 output('Invoked attachedCallback.'); | |
| 18 }; | |
| 19 proto.detachedCallback = function detachedCallback() | |
| 20 { | |
| 21 output('Invoked detachedCallback.'); | |
| 22 }; | |
| 23 proto.attributeChangedCallback = function attributeChangedCallback() | |
| 24 { | |
| 25 output('Invoked attributeChangedCallback.'); | |
| 26 }; | |
| 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(); | |
| 32 } | |
| 33 | |
| 34 function test() | |
| 35 { | |
| 36 InspectorTest.startDebuggerTest(step1, true); | |
| 37 | |
| 38 function step1() | |
| 39 { | |
| 40 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | |
| 41 } | |
| 42 | |
| 43 function step2() | |
| 44 { | |
| 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 | |
| 54 ]; | |
| 55 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); | |
| 56 } | |
| 57 | |
| 58 function step3() | |
| 59 { | |
| 60 InspectorTest.completeDebuggerTest(); | |
| 61 } | |
| 62 } | |
| 63 | |
| 64 </script> | |
| 65 </head> | |
| 66 | |
| 67 <body onload="runTest()"> | |
| 68 <p> | |
| 69 Tests stepping out from custom element callbacks. | |
| 70 </p> | |
| 71 </body> | |
| 72 </html> | |
| OLD | NEW |