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

devtools: Reenable inspector-backend-commands.js http test.

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

Adapt to changes that have happened in devtools-frontend since then:
* Rename Protocol to ProtocolClient
  <https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107558>
* Adjust -expected.txt and essentially revert commit 424f76fd ("update
  test for devtools inspector backend")
  <https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2193586>
* Remove the last argument to the registerCommand() call.
  <https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230524>

Bug: 1011811
Change-Id: I7f311536f6c25577f86e8906723f61a6c9b0ad96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575016
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: default avatarSimon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834596}
parent 08c6dfa1
......@@ -1738,7 +1738,6 @@ 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/inspector-backend-commands.js [ Pass Failure ]
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 ]
......
Tests correctness of promisified protocol commands.
error: Request Profiler.commandError failed. {"message":"this is the error message"}
commandError: catch result: {"message":"this is the error message"}
commandError: then result: null
commandArgs0: then result: undefined
error: Protocol Error: Extra 1 arguments in a call to method 'Profiler.commandArgs0'.
commandArgs0: then result: null
......
......@@ -5,7 +5,7 @@
(async function() {
TestRunner.addResult(`Tests correctness of promisified protocol commands.\n`);
Protocol.test.suppressRequestErrors = false;
ProtocolClient.test.suppressRequestErrors = false;
function dumpArgument(name, value) {
TestRunner.addResult(name + ' result: ' + (typeof value === 'string' ? value : JSON.stringify(value)));
}
......@@ -47,20 +47,20 @@
}]
};
// The protocol definition above is not used, but is left as a reference for commands below.
Protocol.inspectorBackend.registerCommand('Profiler.commandArgs0', [], [], false);
Protocol.inspectorBackend.registerCommand(
'Profiler.commandArgs1Rets0', [{'name': 'arg1', 'type': 'number', 'optional': false}], [], false);
Protocol.inspectorBackend.registerCommand(
'Profiler.commandArgs1Rets1', [{'name': 'arg1', 'type': 'object', 'optional': false}], ['arg1'], false);
Protocol.inspectorBackend.registerCommand(
ProtocolClient.inspectorBackend.registerCommand('Profiler.commandArgs0', [], []);
ProtocolClient.inspectorBackend.registerCommand(
'Profiler.commandArgs1Rets0', [{'name': 'arg1', 'type': 'number', 'optional': false}], []);
ProtocolClient.inspectorBackend.registerCommand(
'Profiler.commandArgs1Rets1', [{'name': 'arg1', 'type': 'object', 'optional': false}], ['arg1']);
ProtocolClient.inspectorBackend.registerCommand(
'Profiler.commandArgs3Rets3',
[
{'name': 'arg1', 'type': 'object', 'optional': false}, {'name': 'arg2', 'type': 'number', 'optional': true},
{'name': 'arg3', 'type': 'string', 'optional': true}
],
['arg1', 'arg2', 'arg3'], false);
Protocol.inspectorBackend.registerCommand(
'Profiler.commandError', [{'name': 'error', 'type': 'object', 'optional': false}], [], false);
['arg1', 'arg2', 'arg3']);
ProtocolClient.inspectorBackend.registerCommand(
'Profiler.commandError', [{'name': 'error', 'type': 'object', 'optional': false}], []);
var sendMessageToBackendOriginal = InspectorFrontendHost.sendMessageToBackend;
InspectorFrontendHost.sendMessageToBackend = sendMessageToBackendLoopback;
......
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