Commit bf91507f authored by Kim-Anh Tran's avatar Kim-Anh Tran Committed by Commit Bot

Update devtools webtests after change in front-end

This removes one test as it is no longer relevant. Otherwise, updating
another one following the change in devtools-frontend.

Bug: chromium:1105172
Change-Id: I02dfd40dcc926aefe9cdddfa5fdecec318e26c66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315857Reviewed-by: default avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792638}
parent a8682153
......@@ -6863,10 +6863,6 @@ crbug.com/1107634 [ Mac10.10 ] virtual/text-antialias/selection/select-ligature-
crbug.com/1107634 [ Mac10.10 ] virtual/text-antialias/selection/select-ligature-vertical-2.html [ Pass Failure ]
crbug.com/1107634 [ Mac10.10 ] virtual/text-antialias/selection/select-ligature-vertical-3.html [ Pass Failure ]
# Temporarily disable tests to allow a fix in devtools frontend
crbug.com/1105172 http/tests/devtools/sources/debugger/source-frame-breakpoint-decorations.js [ Pass Timeout Failure ]
crbug.com/1105172 http/tests/devtools/sources/debugger-breakpoints/use-possible-breakpoints-to-resolve-breakpoint.js [ Pass Timeout Failure ]
# Sheriff 2020-07-22
crbug.com/1107722 [ Mac ] http/tests/devtools/tracing/timeline-js/timeline-script-id.js [ Pass Failure ]
crbug.com/1107722 [ Mac ] virtual/threaded/http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Pass Failure ]
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(
`Checks that locations are correctly resolved for gutter click.\n`);
await TestRunner.loadModule('sources_test_runner');
await TestRunner.showPanel('sources');
await TestRunner.evaluateInPageAnonymously(`
function foo() {
var p = Promise.resolve()
.then(() => 239);
console.log(42);
// comments 1
// comments 2
// comments 3
// comments 4
// comments 5
fetch("url").then(response => response.data()).then(data => data.json());
// comment 6
// super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment, super long comment,
// comment 7
Promise.resolve();
return p;
}
//# sourceURL=foo.js
`);
SourcesTestRunner.startDebuggerTestPromise().then(
() => SourcesTestRunner.showScriptSource('foo.js', didShowScriptSource));
async function didShowScriptSource(sourceFrame) {
await SourcesTestRunner.waitUntilDebuggerPluginLoaded(sourceFrame);
var uiSourceCode = sourceFrame._uiSourceCode;
var breakpointManager = Bindings.breakpointManager;
setBreakpoint(breakpointManager, sourceFrame, 3, false)
.then(() => setBreakpoint(breakpointManager, sourceFrame, 4, false))
.then(() => setBreakpoint(breakpointManager, sourceFrame, 5, false))
.then(() => setBreakpoint(breakpointManager, sourceFrame, 6, false))
.then(() => setBreakpoint(breakpointManager, sourceFrame, 11, false))
.then(() => setBreakpoint(breakpointManager, sourceFrame, 12, false))
.then(() => setBreakpoint(breakpointManager, sourceFrame, 13, false))
.then(() => SourcesTestRunner.completeDebuggerTest());
}
function setBreakpoint(
breakpointManager, sourceFrame, lineNumberClicked, shiftKey) {
var resolveCallback;
var promise = new Promise(resolve => resolveCallback = resolve);
TestRunner.addSniffer(
Sources.DebuggerPlugin.prototype, '_breakpointWasSetForTest',
dumpLocation, false);
SourcesTestRunner.debuggerPlugin(sourceFrame)._handleGutterClick({
data: {
lineNumber: lineNumberClicked,
event: {button: 0, shiftKey: shiftKey, consume: () => true},
gutterType: SourceFrame.SourcesTextEditor.lineNumbersGutterType
}
});
return promise;
function dumpLocation(lineNumber, columnNumber, condition, enabled) {
TestRunner.addResult(
`${lineNumberClicked}: breakpointAdded(${lineNumber}, ${
columnNumber
})`);
resolveCallback();
}
}
})();
......@@ -33,8 +33,6 @@ breakpoint at 2 conditional
inline breakpoint at (2, 13) disabled
Disable breakpoints
breakpoint at 2 disabled conditional
inline breakpoint at (2, 4) disabled
inline breakpoint at (2, 13) disabled
Enable breakpoints
breakpoint at 2 conditional
inline breakpoint at (2, 4)
......
......@@ -115,7 +115,7 @@
TestRunner.addResult('Disable breakpoints');
SourcesTestRunner
.runActionAndWaitForExactBreakpointDecorations(
javaScriptSourceFrame, [[2, 2]],
javaScriptSourceFrame, [[2, 1]],
() => SourcesTestRunner.toggleBreakpoint(
javaScriptSourceFrame, 2, true))
.then(enabledAll);
......
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