3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
5 <script src=
"../../../http/tests/inspector/resources/compiled.js"></script>
10 InspectorTest
.startDebuggerTest(step1
);
14 InspectorTest
.showScriptSource("source1.js", step2
);
17 function step2(sourceFrame
)
19 InspectorTest
.addSniffer(WebInspector
.BreakpointManager
.TargetBreakpoint
.prototype, "_addResolvedLocation", didSetBreakpointInDebugger
, true);
21 InspectorTest
.setBreakpoint(sourceFrame
, 14, "", true);
22 InspectorTest
.setBreakpoint(sourceFrame
, 15, "", true);
26 function didSetBreakpointInDebugger()
30 //Both breakpoints are resolved before reload
31 InspectorTest
.dumpBreakpointSidebarPane("Breakpoints before reload:");
33 InspectorTest
.reloadPage(onPageReloaded
);
37 function waitForBreakpoints()
39 var breakpointAddCounter
= 2;
40 var jsBreakpoints
= WebInspector
.panels
.sources
.sidebarPanes
.jsBreakpoints
;
41 jsBreakpoints
.didReceiveBreakpointLineForTest = function(uiSourceCode
)
43 if (WebInspector
.CompilerScriptMapping
.StubProjectID
=== uiSourceCode
.project().id())
45 --breakpointAddCounter
;
46 if (breakpointAddCounter
)
48 breakpointSourcesReceived
= true;
55 var breakpointSourcesReceived
= false;
56 var pageReloaded
= false;
58 function onPageReloaded()
64 function maybeCompleteTest()
66 if (!pageReloaded
|| !breakpointSourcesReceived
)
68 InspectorTest
.dumpBreakpointSidebarPane("Breakpoints after reload:");
69 InspectorTest
.completeDebuggerTest();
76 <body onload=
"runTest()">
78 Tests
"reload" from within inspector window while on pause.