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

Unified Diff: chrome/browser/browser_keyevents_browsertest.cc

Issue 10073014: Add more functionality to WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/browser_keyevents_browsertest.cc
===================================================================
--- chrome/browser/browser_keyevents_browsertest.cc (revision 132579)
+++ chrome/browser/browser_keyevents_browsertest.cc (working copy)
@@ -364,7 +364,7 @@
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
int tab_index = browser()->active_index();
for (size_t i = 0; i < arraysize(kTestNoInput); ++i) {
@@ -449,7 +449,7 @@
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
int tab_index = browser()->active_index();
// Press Ctrl+F, which will make the Find box open and request focus.
@@ -459,11 +459,11 @@
// Press Escape to close the Find box and move the focus back to the web page.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_ESCAPE, false, false, false, false));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Press Ctrl+F with keydown suppressed shall not open the find box.
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlFSuppressKeyDown));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlZ));
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlZSuppressKeyDown));
@@ -495,7 +495,7 @@
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
int tab_index = browser()->active_index();
// Press Cmd+F, which will make the Find box open and request focus.
@@ -505,11 +505,11 @@
// Press Escape to close the Find box and move the focus back to the web page.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_ESCAPE, false, false, false, false));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Press Cmd+F with keydown suppressed shall not open the find box.
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCmdFSuppressKeyDown));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
}
#endif
@@ -597,7 +597,7 @@
ui_test_utils::RunAllPendingInMessageLoop();
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
int tab_index = browser()->active_index();
// Make sure no element is focused.
@@ -628,7 +628,7 @@
// Move the focus back to the web page.
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Make sure no element is focused.
EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L""));
@@ -639,7 +639,7 @@
// a part of the default action of the key event, so it should not be
// suppressed at all.
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAccessDSuppress));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L"D"));
// Blur the focused element.
@@ -670,7 +670,7 @@
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
ASSERT_EQ(1, browser()->tab_count());
@@ -708,7 +708,7 @@
// Make sure the focus is in the testing page.
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Reserved accelerators can't be suppressed.
ASSERT_NO_FATAL_FAILURE(SuppressAllEvents(1, true));
@@ -767,7 +767,7 @@
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
int tab_index = browser()->active_index();
ASSERT_NO_FATAL_FAILURE(SetFocusedElement(tab_index, L"A"));
@@ -804,7 +804,7 @@
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
int tab_index = browser()->active_index();
ASSERT_NO_FATAL_FAILURE(SetFocusedElement(tab_index, L"A"));
@@ -846,7 +846,7 @@
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
int tab_index = browser()->active_index();
// Press and release Alt key to focus wrench menu button.
@@ -854,15 +854,15 @@
EXPECT_TRUE(IsViewFocused(VIEW_ID_APP_MENU));
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Alt key can be suppressed.
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Ctrl+Alt should have no effect.
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
}
#endif
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698