OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 <script src="../../../http/tests/inspector/resources/compiled.js"></script> | 5 <script src="../../../http/tests/inspector/resources/compiled.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 var test = function() | 8 var test = function() |
9 { | 9 { |
10 InspectorTest.startDebuggerTest(step1); | 10 InspectorTest.startDebuggerTest(step1); |
11 | 11 |
12 function step1() | 12 function step1() |
13 { | 13 { |
14 InspectorTest.showScriptSource("source1.js", step2); | 14 InspectorTest.showScriptSource("source1.js", step2); |
15 } | 15 } |
16 | 16 |
17 function step2(sourceFrame) | 17 function step2(sourceFrame) |
18 { | 18 { |
19 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint
.prototype, "_addResolvedLocation", didSetBreakpointInDebugger, true); | 19 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint
.prototype, "_addResolvedLocation", didSetBreakpointInDebugger, true); |
20 | 20 |
21 InspectorTest.setBreakpoint(sourceFrame, 14, "", true); | 21 InspectorTest.setBreakpoint(sourceFrame, 14, "", true); |
22 InspectorTest.setBreakpoint(sourceFrame, 15, "", true); | 22 InspectorTest.setBreakpoint(sourceFrame, 15, "", true); |
23 | 23 |
24 var counter = 2; | 24 var counter = 2; |
25 | 25 |
26 function didSetBreakpointInDebugger() | 26 function didSetBreakpointInDebugger() |
27 { | 27 { |
28 counter--; | 28 counter--; |
29 if (!counter) { | 29 if (counter) |
30 //Both breakpoints are resolved before reload | 30 return; |
31 InspectorTest.dumpBreakpointSidebarPane("Breakpoints before relo
ad:"); | 31 //Both breakpoints are resolved before reload |
32 waitForBreakpoints(); | 32 InspectorTest.addSniffer(WebInspector.JavaScriptBreakpointsSidebarPa
ne.prototype, "didReceiveBreakpointLineForTest", onBreakpointsReady); |
33 InspectorTest.reloadPage(onPageReloaded); | 33 } |
34 } | 34 |
| 35 function onBreakpointsReady() |
| 36 { |
| 37 InspectorTest.dumpBreakpointSidebarPane("Breakpoints before reload:"
); |
| 38 waitForBreakpoints(); |
| 39 InspectorTest.reloadPage(onPageReloaded); |
35 } | 40 } |
36 | 41 |
37 function waitForBreakpoints() | 42 function waitForBreakpoints() |
38 { | 43 { |
39 var breakpointAddCounter = 2; | 44 var breakpointAddCounter = 2; |
40 var jsBreakpoints = WebInspector.panels.sources.sidebarPanes.jsBreak
points; | 45 var jsBreakpoints = WebInspector.panels.sources.sidebarPanes.jsBreak
points; |
41 jsBreakpoints.didReceiveBreakpointLineForTest = function(uiSourceCod
e) | 46 jsBreakpoints.didReceiveBreakpointLineForTest = function(uiSourceCod
e) |
42 { | 47 { |
43 if (WebInspector.CompilerScriptMapping.StubProjectID === uiSourc
eCode.project().id()) | 48 if (WebInspector.CompilerScriptMapping.StubProjectID === uiSourc
eCode.project().id()) |
44 return; | 49 return; |
(...skipping 28 matching lines...) Expand all Loading... |
73 </script> | 78 </script> |
74 </head> | 79 </head> |
75 | 80 |
76 <body onload="runTest()"> | 81 <body onload="runTest()"> |
77 <p> | 82 <p> |
78 Tests "reload" from within inspector window while on pause. | 83 Tests "reload" from within inspector window while on pause. |
79 </p> | 84 </p> |
80 | 85 |
81 </body> | 86 </body> |
82 </html> | 87 </html> |
OLD | NEW |