Commit 8ba30306 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Chromium LUCI CQ

devtools: Reenable more http tests disabled in r751643.

Those tests were disabled in commit 46327ef9 ("Temporarily disable
web tests that use the legacy Protocol global") but were never enabled
again.

Adapt to changes that have happened in devtools-frontend and Chromium
since then:
* Rename Protocol to ProtocolClient
  <https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107558>
* Update expectations and trim error messages in report-protocol-errors.js
  <https://chromium-review.googlesource.com/c/chromium/src/+/2254707>

screen-orientation-override.js was kept in TestExpectations because it
is still timing out due to other setDeviceMetricsOverride()-related
changes.

Bug: 1011811
Change-Id: I7f0847827dd4ff28bcb646df684039accf7b56f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575117
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarSimon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834613}
parent cf48348c
......@@ -1738,9 +1738,7 @@ crbug.com/400841 media/video-canvas-draw.html [ Failure ]
crbug.com/1032016 http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-shifted-breakpoint.js [ Pass Failure Timeout ]
# Renaming front_end/protocol to front_end/protocol_client requires a 3-way change. Temporarliy disable web tests that use |Protocol|
crbug.com/1011811 http/tests/devtools/report-protocol-errors.js [ Pass Failure ]
crbug.com/1047760 http/tests/devtools/screen-orientation-override.js [ Pass Failure Timeout ]
crbug.com/1011811 http/tests/devtools/elements/styles-1/cached-sync-computed-styles.js [ Pass Failure ]
crbug.com/1047760 http/tests/devtools/screen-orientation-override.js [ Pass Timeout ]
# switching to apache-win32: needs triaging.
crbug.com/528062 [ Win ] http/tests/css/missing-repaint-after-slow-style-sheet.pl [ Failure ]
......
......@@ -35,7 +35,7 @@
function step1(node) {
var callsLeft = 2;
nodeId = node.id;
TestRunner.addSniffer(Protocol.SessionRouter.prototype, 'sendMessage', onBackendCall, true);
TestRunner.addSniffer(ProtocolClient.SessionRouter.prototype, 'sendMessage', onBackendCall, true);
TestRunner.cssModel.computedStylePromise(nodeId).then(styleCallback);
TestRunner.cssModel.computedStylePromise(nodeId).then(styleCallback);
function styleCallback() {
......
......@@ -48,7 +48,7 @@ Tests that InspectorBackendDispatcher is catching incorrect messages.
{
error : {
code : -32602
data : "nodeId: integer value expected"
data : "Failed to deserialize params - CBOR: map start expected <somewhere>"
message : "Invalid parameters"
}
id : 4
......@@ -57,7 +57,7 @@ Tests that InspectorBackendDispatcher is catching incorrect messages.
{
error : {
code : -32602
data : "nodeId: integer value expected"
data : "Failed to deserialize params - CBOR: map start expected <somewhere>"
message : "Invalid parameters"
}
id : 5
......@@ -66,7 +66,7 @@ Tests that InspectorBackendDispatcher is catching incorrect messages.
{
error : {
code : -32602
data : "nodeId: integer value expected"
data : "Failed to deserialize params.nodeId - BINDINGS: mandatory field missing <somewhere>"
message : "Invalid parameters"
}
id : 6
......@@ -75,7 +75,7 @@ Tests that InspectorBackendDispatcher is catching incorrect messages.
{
error : {
code : -32602
data : "nodeId: integer value expected"
data : "Failed to deserialize params.nodeId - BINDINGS: int32 value expected <somewhere>"
message : "Invalid parameters"
}
id : 7
......
......@@ -5,6 +5,12 @@
(async function() {
TestRunner.addResult(`Tests that InspectorBackendDispatcher is catching incorrect messages.\n`);
function trimErrorMessage(message) {
if (message.error && message.error.data) {
message.error.data = message.error.data.replace(/at position \d+/, "<somewhere>");
}
return message;
}
var messages = [
'some wrong string',
......@@ -30,9 +36,9 @@
var numberOfReports = 0;
Protocol.InspectorBackend.reportProtocolError = function(error, message) {
ProtocolClient.InspectorBackend.reportProtocolError = function(error, message) {
if (numberOfReports < messages.length) {
TestRunner.addObject(message);
TestRunner.addObject(trimErrorMessage(message));
TestRunner.addResult('-------------------------------------------------------');
}
......
......@@ -8,7 +8,7 @@
await TestRunner.navigatePromise('resources/screen-orientation-resource.html');
Protocol.test.suppressRequestErrors = false;
ProtocolClient.test.suppressRequestErrors = false;
function addDumpResult(next) {
TestRunner.evaluateInPage('dump()', dumpCallback);
......
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