Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-breakpoints / debugger-disable-add-breakpoint.html
bloba8790c2e3d3fac0f278cef867405bfda47e05e06
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 return 0;
12 var test = function()
14 var testName = InspectorTest.resourceTreeModel.inspectedPageURL();
15 testName = testName.substring(testName.lastIndexOf('/') + 1);
16 InspectorTest.startDebuggerTest(step1);
17 var testSourceFrame;
18 function step1()
20 InspectorTest.showScriptSource(testName, step2);
23 function step2(sourceFrame)
25 testSourceFrame = sourceFrame;
26 InspectorTest.addResult("Main resource was shown.");
27 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasDisabled, step3, this);
28 InspectorTest.debuggerModel.disableDebugger();
31 function step3()
33 InspectorTest.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.DebuggerWasDisabled, step3, this);
34 InspectorTest.addResult("Debugger disabled.");
35 InspectorTest.setBreakpoint(testSourceFrame, 8, "", true);
36 InspectorTest.addResult("Breakpoint added");
37 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasEnabled, step4, this);
38 InspectorTest.debuggerModel.enableDebugger();
41 function step4()
43 InspectorTest.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.DebuggerWasEnabled, step4, this);
44 InspectorTest.addResult("Debugger was enabled");
45 InspectorTest.runTestFunctionAndWaitUntilPaused(step5);
48 function step5()
50 InspectorTest.resumeExecution(step6);
53 function step6()
55 InspectorTest.addResult("Disable debugger again");
56 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasDisabled, step7, this);
57 InspectorTest.debuggerModel.disableDebugger();
60 function step7()
62 InspectorTest.addResult("Debugger disabled");
63 var breakpoint = WebInspector.breakpointManager.findBreakpointOnLine(testSourceFrame.uiSourceCode(), 8);
64 breakpoint.remove();
65 InspectorTest.addResult("Breakpoint removed");
66 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasEnabled, step8, this);
67 InspectorTest.debuggerModel.enableDebugger();
70 function step8()
72 InspectorTest.addResult("Debugger enabled");
73 InspectorTest.addResult("Evaluating test function.");
74 InspectorTest.evaluateInPage("testFunction()", step9);
77 function step9()
79 InspectorTest.addResult("function evaluated without a pause on the breakpoint.")
80 InspectorTest.completeDebuggerTest();
84 </script>
85 </head>
87 <body onload="runTest()">
88 <p>
89 Tests that breakpoints are correctly handled while debugger is turned off</a>
90 </p>
91 </body>
92 </html>