Commit e4152afd authored by Meilin Wang's avatar Meilin Wang Committed by Commit Bot

Register Assistant key as a supported accelerator in autotest API.

This CL adds Assistant key to the supported accelerator list used
in AutotestPrivateActivateAcceleratorFunction, so that we can mimic
the key press to open/close the Assistant UI in the integration test
through that API.

Related CL using this API:
https://chromium-review.googlesource.com/c/chromiumos/platform/tast-tests/+/1975040

Misc: fixes Linter warnings.

Bug: b/145218971
Test: local compile.
Change-Id: Icafcaea356e55319ff7ccf4300a2b6a2ee697d7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1977192
Commit-Queue: Meilin Wang <meilinw@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726630}
parent f5232c5d
......@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.h"
#include <algorithm>
#include <deque>
#include <set>
#include <sstream>
#include <utility>
......@@ -569,6 +571,7 @@ ui::KeyboardCode StringToKeyCode(const std::string& str) {
ui::KeyboardCode key_code;
} map[] = {
{"search", ui::VKEY_LWIN},
{"assistant", ui::VKEY_ASSISTANT},
};
DCHECK(base::IsStringASCII(str));
if (str.length() == 1) {
......@@ -3789,7 +3792,7 @@ ExtensionFunction::ResponseAction AutotestPrivateMouseMoveFunction::Run() {
int flags = env->mouse_button_flags();
ui::EventType type = (flags == 0) ? ui::ET_MOUSE_MOVED : ui::ET_MOUSE_DRAGGED;
for (int64_t i = 1; i <= steps; ++i) {
double progress = double(i) / double(steps);
double progress = static_cast<double>(i) / static_cast<double>(steps);
gfx::PointF point(gfx::Tween::FloatValueBetween(progress, start_in_host.x(),
location_in_host.x()),
gfx::Tween::FloatValueBetween(progress, start_in_host.y(),
......
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