Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger / debugger-suspend-active-dom-objects.html
blob58e4ccc47f45e916542077fb82084c07eea5c3db
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() {
8 setTimeout("void 0", 0); // Create a timer that will be suspended on a breakpoint.
9 debugger;
12 function test()
14 InspectorTest.startDebuggerTest(startDebuggerTestCallback);
16 function startDebuggerTestCallback()
18 InspectorTest.evaluateInPage("setTimeout(testFunction, 0)", function(result) {
19 InspectorTest.addResult("Set timer for test function.");
20 });
22 InspectorTest.waitUntilPaused(function(callFrames) {
23 InspectorTest.evaluateInPage("alert(1)", function(result) {
24 InspectorTest.addResult("Shown alert while staying on a breakpoint.");
25 InspectorTest.completeDebuggerTest();
26 });
27 });
32 </script>
33 </head>
35 <body onload="runTest()">
36 <p>
37 Tests that browser won't crash if user evaluates something in the console
38 that would suspend active dom objects (e.g. if user attempts to show an alert)
39 when script execution is paused on a breakpoint and all active dom objects
40 are already suspended.
41 </p>
43 </body>
44 </html>