Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc

Issue 2048533002: Add code and key into the browser test key simulation methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos build Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
index a253a144c69b49783b30563b5d0e8f191c7ebb13..e25a322b3b25e03d4ec16ab89b16c4c44d7c413f 100644
--- a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
@@ -376,8 +376,9 @@ class WebViewInteractiveTestBase : public extensions::PlatformAppBrowserTest {
popup_observer.Init();
// Press alt+DOWN to open popup.
bool alt = true;
- content::SimulateKeyPress(
- guest_web_contents(), ui::VKEY_DOWN, false, false, alt, false);
+ content::SimulateKeyPress(guest_web_contents(), ui::DomKey::ARROW_DOWN,
+ ui::DomCode::ARROW_DOWN, ui::VKEY_DOWN, false,
+ false, alt, false);
popup_observer.Wait();
content::RenderWidgetHost* popup_rwh =
@@ -403,8 +404,9 @@ class WebViewInteractiveTestBase : public extensions::PlatformAppBrowserTest {
EXPECT_LE(std::abs(diff.y() - top_spacing), threshold_px);
// Close the popup.
- content::SimulateKeyPress(
- guest_web_contents(), ui::VKEY_ESCAPE, false, false, false, false);
+ content::SimulateKeyPress(guest_web_contents(), ui::DomKey::ESCAPE,
+ ui::DomCode::ESCAPE, ui::VKEY_ESCAPE, false,
+ false, false, false);
}
void DragTestStep1() {
@@ -678,8 +680,9 @@ IN_PROC_BROWSER_TEST_F(WebViewFocusInteractiveTest, Focus_AdvanceFocus) {
SimulateRWHMouseClick(
embedder_web_contents->GetRenderViewHost()->GetWidget(),
blink::WebMouseEvent::ButtonLeft, 200, 20);
- content::SimulateKeyPress(embedder_web_contents, ui::VKEY_TAB,
- false, false, false, false);
+ content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB,
+ ui::DomCode::TAB, ui::VKEY_TAB, false, false,
+ false, false);
ASSERT_TRUE(listener.WaitUntilSatisfied());
}
@@ -693,12 +696,15 @@ IN_PROC_BROWSER_TEST_F(WebViewFocusInteractiveTest, Focus_AdvanceFocus) {
// element. The initial element is dependent upon tab direction which blink
// does not propagate to the plugin.
// See http://crbug.com/147644.
- content::SimulateKeyPress(embedder_web_contents, ui::VKEY_TAB,
- false, false, false, false);
- content::SimulateKeyPress(embedder_web_contents, ui::VKEY_TAB,
- false, false, false, false);
- content::SimulateKeyPress(embedder_web_contents, ui::VKEY_TAB,
- false, false, false, false);
+ content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB,
+ ui::DomCode::TAB, ui::VKEY_TAB, false, false,
+ false, false);
+ content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB,
+ ui::DomCode::TAB, ui::VKEY_TAB, false, false,
+ false, false);
+ content::SimulateKeyPress(embedder_web_contents, ui::DomKey::TAB,
+ ui::DomCode::TAB, ui::VKEY_TAB, false, false,
+ false, false);
ASSERT_TRUE(listener.WaitUntilSatisfied());
}
}
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | chrome/browser/autofill/autofill_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698