| Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
|
| index 5d921335d4f361f0d6e9ab85cd24f4d1a295105d..25372b7152d3bb084d024ff4214d0b1a1f9d69ae 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html
|
| @@ -16,76 +16,33 @@ var test = function()
|
|
|
| function step2(sourceFrame)
|
| {
|
| - InspectorTest.addSniffer(Bindings.BreakpointManager.TargetBreakpoint.prototype, "_addResolvedLocation", didSetBreakpointInDebugger, true);
|
| -
|
| + InspectorTest.waitBreakpointSidebarPane().then(onBreakpointsReady);
|
| InspectorTest.setBreakpoint(sourceFrame, 14, "", true);
|
| InspectorTest.setBreakpoint(sourceFrame, 15, "", true);
|
|
|
| - var counter = 2;
|
| -
|
| - function didSetBreakpointInDebugger()
|
| - {
|
| - counter--;
|
| - if (counter)
|
| - return;
|
| - //Both breakpoints are resolved before reload
|
| - InspectorTest.addSniffer(Sources.JavaScriptBreakpointsSidebarPane.prototype, "didReceiveBreakpointLineForTest", onBreakpointsReady);
|
| - }
|
| -
|
| function onBreakpointsReady()
|
| {
|
| InspectorTest.dumpBreakpointSidebarPane("Breakpoints before reload:");
|
| - waitForBreakpoints();
|
| - InspectorTest.reloadPage(onPageReloaded);
|
| + InspectorTest.waitBreakpointSidebarPane().then(finishIfReady)
|
| + InspectorTest.reloadPage();
|
| }
|
|
|
| - function waitForBreakpoints()
|
| - {
|
| - var expectedBreakpointLocations = [[14, 0], [16, 4]];
|
| - var jsBreakpoints = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane);
|
| - jsBreakpoints.didReceiveBreakpointLineForTest = function(uiSourceCode, line, column)
|
| - {
|
| - if (Bindings.CompilerScriptMapping.StubProjectID === uiSourceCode.project().id())
|
| - return;
|
| - if (!uiSourceCode.url().endsWith("source1.js"))
|
| - return;
|
| -
|
| - expectedBreakpointLocations =
|
| - expectedBreakpointLocations.filter((location) => (location[0] != line && location[1] != column));
|
| - if (expectedBreakpointLocations.length)
|
| - return;
|
| - breakpointSourcesReceived = true;
|
| - maybeCompleteTest();
|
| + function finishIfReady() {
|
| + var content = InspectorTest.breakpointsSidebarPaneContent();
|
| + if (content.indexOf('source1.js') !== -1) {
|
| + InspectorTest.addResult("Breakpoints after reload:");
|
| + InspectorTest.addResult(content);
|
| + InspectorTest.completeDebuggerTest();
|
| + } else {
|
| + InspectorTest.waitBreakpointSidebarPane().then(finishIfReady);
|
| }
|
| }
|
| -
|
| - }
|
| -
|
| - var breakpointSourcesReceived = false;
|
| - var pageReloaded = false;
|
| -
|
| - function onPageReloaded()
|
| - {
|
| - pageReloaded = true;
|
| - maybeCompleteTest();
|
| - }
|
| -
|
| - function maybeCompleteTest()
|
| - {
|
| - if (!pageReloaded || !breakpointSourcesReceived)
|
| - return;
|
| - InspectorTest.dumpBreakpointSidebarPane("Breakpoints after reload:");
|
| - InspectorTest.completeDebuggerTest();
|
| }
|
| }
|
|
|
| </script>
|
| </head>
|
| -
|
| <body onload="runTest()">
|
| -<p>
|
| - Tests "reload" from within inspector window while on pause.
|
| -</p>
|
| -
|
| +<p>Tests "reload" from within inspector window while on pause.</p>
|
| </body>
|
| </html>
|
|
|