3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/console-test.js"></script>
5 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
10 "var proto = Object.create(HTMLElement.prototype);",
11 "proto.createdCallback = function() { output('Invoked createdCallback.'); };",
12 "proto.attachedCallback = function() { output('Invoked attachedCallback.'); };",
13 "proto.detachedCallback = function() { output('Invoked detachedCallback.'); };",
14 "proto.attributeChangedCallback = function() { output('Invoked attributeChangedCallback.'); };",
15 "CustomElement = document.registerElement('x-foo', {prototype: proto});",
18 var lifecycleCallbacks
= [
19 "created = new CustomElement();",
20 "created.setAttribute('x', '1');",
21 "document.body.appendChild(created);",
25 InspectorTest
.startDebuggerTest(step1
);
28 InspectorTest
.evaluateInConsole(setup
, function() {
29 InspectorTest
.addResult("Custom element registered.");
30 InspectorTest
.evaluateInConsoleAndDump("new CustomElement() instanceof CustomElement", step2
);
35 InspectorTest
.evaluateInConsole('debugger;');
36 InspectorTest
.waitUntilPaused(step3
);
40 InspectorTest
.evaluateInConsoleAndDump("new CustomElement() instanceof CustomElement", step4
);
44 InspectorTest
.evaluateInConsole(lifecycleCallbacks
, InspectorTest
.completeDebuggerTest
);
51 <body onload=
"runTest()">
53 Tests that custom element lifecycle events fire while debugger is paused.