Commit c2d7fd90 authored by Jack Lynch's avatar Jack Lynch Committed by Commit Bot

Devtools: Fix and reenable js breakpoints tests

This CL fixes tests that will be broken by
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1891267

Bug: 963183
Change-Id: I009b29a449d76d2a147fd32bb72bf8b2d4e5ebc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636716Reviewed-by: default avatarRobert Paveza <Rob.Paveza@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#729885}
parent 3ad86420
......@@ -7221,23 +7221,6 @@ crbug.com/1018640 external/wpt/web-bundle/* [ Skip ]
crbug.com/1038656 [ Mac ] http/tests/devtools/coverage/coverage-view-unused.js [ Pass Failure ]
crbug.com/1038656 [ Win ] http/tests/devtools/coverage/coverage-view-unused.js [ Pass Failure ]
# Temporarily disabled to land breakpoints changes in devtools
crbug.com/963183 http/tests/devtools/persistence/persistence-move-breakpoints.js [ Pass Failure ]
crbug.com/963183 [ Mac ] http/tests/devtools/persistence/persistence-move-breakpoints-on-reload.js [ Pass Failure ]
crbug.com/963183 [ Win ] http/tests/devtools/persistence/persistence-move-breakpoints-on-reload.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-breakpoints/breakpoints-sidebar-pane.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-breakpoints/disable-breakpoints.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-breakpoints/set-breakpoint.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-breakpoints/set-conditional-breakpoint.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-breakpoints/set-logpoint.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-ui/click-gutter-breakpoint.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-ui/script-formatter-breakpoints-2.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger-ui/script-formatter-breakpoints-3.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/sources/debugger/js-with-inline-stylesheets.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/startup/sources/debugger/script-formatter-breakpoints-1.js [ Pass Failure ]
crbug.com/963183 http/tests/devtools/startup/sources/debugger/script-formatter-breakpoints-inline-with-sourceURL.js [ Pass Failure ]
crbug.com/1030086 external/wpt/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-extra.html [ Pass Failure ]
crbug.com/1030086 external/wpt/html/infrastructure/safe-passing-of-structured-data/structuredclone_0.html [ Pass Failure ]
......
......@@ -51,11 +51,10 @@
]);
function dumpBreakpointSidebarPane() {
var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane).contentElement;
var empty = paneElement.querySelector('.gray-info-message');
if (empty)
return TestRunner.textContentWithLineBreaks(empty);
var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry'));
var pane = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane);
if (!pane._emptyElement.classList.contains('hidden'))
return TestRunner.textContentWithLineBreaks(pane._emptyElement);
var entries = Array.from(pane.contentElement.querySelectorAll('.breakpoint-entry'));
for (var entry of entries) {
var uiLocation = entry[Sources.JavaScriptBreakpointsSidebarPane._locationSymbol];
TestRunner.addResult(' ' + uiLocation.uiSourceCode.url() + ':' + uiLocation.lineNumber);
......
......@@ -53,11 +53,10 @@
]);
function dumpBreakpointSidebarPane() {
var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane).contentElement;
var empty = paneElement.querySelector('.gray-info-message');
if (empty)
return TestRunner.textContentWithLineBreaks(empty);
var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry'));
var pane = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane);
if (!pane._emptyElement.classList.contains('hidden'))
return TestRunner.textContentWithLineBreaks(pane._emptyElement);
var entries = Array.from(pane.contentElement.querySelectorAll('.breakpoint-entry'));
for (var entry of entries) {
var uiLocation = entry[Sources.JavaScriptBreakpointsSidebarPane._locationSymbol];
TestRunner.addResult(' ' + uiLocation.uiSourceCode.url() + ':' + uiLocation.lineNumber);
......
......@@ -4,16 +4,16 @@ Script source was shown.
Set first breakpoint.
Breakpoint sidebar pane
a.js:18 return a + b;
a.js:18checked return a + b;
Set second breakpoint on the same line.
Breakpoint sidebar pane
a.js:18:3return a + b;
a.js:18:16
a.js:18:3checkedreturn a + b;
a.js:18:16checked
Set a third breakpoint on a different line.
Breakpoint sidebar pane
a.js:17 b = b / 2;
a.js:18:3return a + b;
a.js:18:16
a.js:17checked b = b / 2;
a.js:18:3checkedreturn a + b;
a.js:18:16checked
Tests "reload" from within inspector window while on pause.
Breakpoint sidebar pane before reload:
source1.js:17}
source1.js:17checked}
Page reloaded.
Breakpoint sidebar pane after reload:
source1.js:17}
source1.js:17checked}
......@@ -8,7 +8,7 @@ Script execution paused.
Call stack:
0) testFunction (disable-breakpoints.js:13)
Breakpoint sidebar pane
disable-breakpoints.js:13 var x = Math.sqrt(10);
disable-breakpoints.js:13checked var x = Math.sqrt(10);
Script execution resumed.
Test function finished.
Disabling breakpoints...
......@@ -24,11 +24,11 @@ Script execution paused.
Call stack:
0) testFunction (disable-breakpoints.js:13)
Breakpoint sidebar pane
disable-breakpoints.js:13 var x = Math.sqrt(10);
disable-breakpoints.js:13checked var x = Math.sqrt(10);
Script execution resumed.
Test function finished.
Breakpoint sidebar pane
disable-breakpoints.js:13 var x = Math.sqrt(10);
disable-breakpoints.js:13checked var x = Math.sqrt(10);
Breakpoints removed.
Breakpoint sidebar pane
No breakpoints
......
......@@ -8,7 +8,7 @@ Script execution paused.
Call stack:
0) testFunction (set-breakpoint.html:14)
Breakpoint sidebar pane
set-breakpoint.html:14 var x = Math.sqrt(10);
set-breakpoint.html:14checked var x = Math.sqrt(10);
Breakpoint sidebar pane
No breakpoints
Script execution resumed.
......
......@@ -8,7 +8,7 @@ Script execution paused.
Call stack:
0) testFunction (set-breakpoint.html:14)
Breakpoint sidebar pane
set-breakpoint.html:14 var x = Math.sqrt(10);
set-breakpoint.html:14checked var x = Math.sqrt(10);
Breakpoint sidebar pane
No breakpoints
Script execution resumed.
......@@ -18,7 +18,7 @@ Script source was shown.
Set timer for test function.
Test function finished.
Breakpoint sidebar pane
set-breakpoint.html:14 var x = Math.sqrt(10);
set-breakpoint.html:14checked var x = Math.sqrt(10);
Breakpoints removed.
Breakpoint sidebar pane
No breakpoints
......
......@@ -6,7 +6,7 @@ Script source was shown.
Set timer for test function.
Test function finished.
Breakpoint sidebar pane
set-breakpoint.html:15 return x;
set-breakpoint.html:15checked return x;
Message count: 1
VM:1 x is 3.1622776601683795
Breakpoints removed.
......
......@@ -2,6 +2,6 @@ Tests that breakpoints can be added and removed by clicking the gutter.
Script execution paused.
Breakpoint sidebar pane while paused
click-breakpoints.js:4 var b = 1; // The breakpoint should happen here
click-breakpoints.js:4checked breakpoint hit var b = 1; // The breakpoint should happen here
Script execution resumed.
......@@ -44,14 +44,11 @@
.then(runScript);
}
function runScript() {
Promise
.all([
SourcesTestRunner.waitBreakpointSidebarPane(),
new Promise(resolve => SourcesTestRunner.waitUntilPaused(resolve))
])
.then(() => SourcesTestRunner.dumpBreakpointSidebarPane('while paused'))
.then(() => SourcesTestRunner.completeDebuggerTest());
async function runScript() {
TestRunner.evaluateInPageWithTimeout('f2()');
await SourcesTestRunner.waitUntilPausedPromise();
await SourcesTestRunner.waitBreakpointSidebarPane();
SourcesTestRunner.dumpBreakpointSidebarPane('while paused');
SourcesTestRunner.completeDebuggerTest();
}
})();
......@@ -6,7 +6,7 @@ Running: testSetup
Running: testBreakpointsSetAndRemoveInFormattedSource
Script execution paused.
Breakpoint sidebar pane while paused in pretty printed
unformatted2.js:formatted:4 var c = 3;
unformatted2.js:formatted:4checked var c = 3;
Breakpoint sidebar pane while paused in raw
No breakpoints
Script execution resumed.
......
......@@ -6,8 +6,8 @@ Running: testSetup
Running: testBreakpointsSetInFormattedAndRemoveInOriginalSource
Script execution paused.
Breakpoint sidebar pane while paused in pretty printed
unformatted3.js:formatted:4 var c = 3;
unformatted3.js:formatted:4checked var c = 3;
Breakpoint sidebar pane while paused in raw
unformatted3.js:3 var a=0;var b=1;var c=3;var d=4;var e=5;
unformatted3.js:3checked breakpoint hit var a=0;var b=1;var c=3;var d=4;var e=5;
Script execution resumed.
......@@ -8,7 +8,7 @@ Script execution paused.
Call stack:
0) testFunction (js-with-inline-stylesheets.js:13)
Breakpoint sidebar pane
js-with-inline-stylesheets.js:13 var x = Math.sqrt(10);
js-with-inline-stylesheets.js:13checked var x = Math.sqrt(10);
Breakpoint sidebar pane
No breakpoints
Script execution resumed.
......
......@@ -6,12 +6,12 @@ Running: testSetup
Running: testBreakpointsInOriginalAndFormattedSource
Script execution paused.
Breakpoint sidebar pane while paused in raw
script-formatter-breakpoints-1.html:10 var f=0;
script-formatter-breakpoints-1.html:10checked breakpoint hit var f=0;
Script execution resumed.
Script execution paused.
Breakpoint sidebar pane while paused in pretty printed
script-formatter-breakpoints-1.html:formatted:12 var f = 0;
script-formatter-breakpoints-1.html:formatted:12checked breakpoint hit var f = 0;
Breakpoint sidebar pane while paused in raw
script-formatter-breakpoints-1.html:10 var f=0;
script-formatter-breakpoints-1.html:10checked breakpoint hit var f=0;
Script execution resumed.
......@@ -6,14 +6,14 @@ Running: testSetup
Running: testBreakpointsInOriginalAndFormattedSource
Script execution paused.
Breakpoint sidebar pane while paused in raw
named-inline-script.js:5 console.log("Hello!");
named-inline-script.js:5checked breakpoint hit console.log("Hello!");
Script execution resumed.
Script execution paused.
Breakpoint sidebar pane while paused in pretty printed
named-inline-script.js:formatted:3 console.log("Hello!");
named-inline-script.js:formatted:3checked breakpoint hit console.log("Hello!");
Breakpoint sidebar pane while paused after removing breakpoint in pretty printed and closing pretty printed
No breakpoints
Breakpoint sidebar pane while paused in original script again
named-inline-script.js:5 console.log("Hello!");
named-inline-script.js:5checked breakpoint hit console.log("Hello!");
Script execution resumed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment