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

Unified Diff: chrome/browser/browser_focus_uitest.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
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/browser_keyevents_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_focus_uitest.cc
===================================================================
--- chrome/browser/browser_focus_uitest.cc (revision 132579)
+++ chrome/browser/browser_focus_uitest.cc (working copy)
@@ -236,7 +236,7 @@
ASSERT_TRUE(IsViewFocused(location_bar_focus_view_id_));
ClickOnView(VIEW_ID_TAB_CONTAINER);
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
ClickOnView(VIEW_ID_LOCATION_BAR);
ASSERT_TRUE(IsViewFocused(location_bar_focus_view_id_));
@@ -254,11 +254,11 @@
gfx::NativeWindow window = browser()->window()->GetNativeHandle();
// The focus should be on the Tab contents.
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Now hide the window, show it again, the focus should not have changed.
ui_test_utils::HideNativeWindow(window);
ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(window));
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
browser()->FocusLocationBar();
ASSERT_TRUE(IsViewFocused(location_bar_focus_view_id_));
@@ -347,7 +347,7 @@
// Activate the tab.
browser()->ActivateTabAt(j, true);
- ViewID vid = kFocusPage[i][j] ? VIEW_ID_TAB_CONTAINER_FOCUS_VIEW :
+ ViewID vid = kFocusPage[i][j] ? VIEW_ID_TAB_CONTAINER :
location_bar_focus_view_id_;
ASSERT_TRUE(IsViewFocused(vid));
}
@@ -356,7 +356,7 @@
// Try the above, but with ctrl+tab. Since tab normally changes focus,
// this has regressed in the past. Loop through several times to be sure.
for (int j = 0; j < 15; j++) {
- ViewID vid = kFocusPage[i][j % 5] ? VIEW_ID_TAB_CONTAINER_FOCUS_VIEW :
+ ViewID vid = kFocusPage[i][j % 5] ? VIEW_ID_TAB_CONTAINER :
location_bar_focus_view_id_;
ASSERT_TRUE(IsViewFocused(vid));
@@ -367,7 +367,7 @@
// As above, but with ctrl+shift+tab.
browser()->ActivateTabAt(4, true);
for (int j = 14; j >= 0; --j) {
- ViewID vid = kFocusPage[i][j % 5] ? VIEW_ID_TAB_CONTAINER_FOCUS_VIEW :
+ ViewID vid = kFocusPage[i][j % 5] ? VIEW_ID_TAB_CONTAINER :
location_bar_focus_view_id_;
ASSERT_TRUE(IsViewFocused(vid));
@@ -398,7 +398,7 @@
browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
// Focus should be on the recently opened tab page.
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Select 1st tab, focus should still be on the location-bar.
// (bug http://crbug.com/23296)
@@ -410,7 +410,7 @@
browser()->Find();
ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
browser()->ActivateTabAt(1, true);
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
browser()->ActivateTabAt(0, true);
ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
}
@@ -620,7 +620,7 @@
ui_test_utils::NavigateToURL(browser(), url);
// Focus should be on the page.
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Let's show an interstitial.
TestInterstitialPage* interstitial_page =
@@ -743,7 +743,7 @@
ui_test_utils::NavigateToURL(browser(), url);
// Page should have focus.
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
EXPECT_TRUE(browser()->GetSelectedWebContents()->GetRenderViewHost()->
GetView()->HasFocus());
@@ -758,14 +758,14 @@
ui_test_utils::RunMessageLoop();
// The interstitial should have focus now.
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
EXPECT_TRUE(interstitial_page->HasFocus());
// Hide the interstitial.
interstitial_page->DontProceed();
// Focus should be back on the original page.
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
}
// Make sure Find box can request focus, even when it is already open.
@@ -812,7 +812,7 @@
// Set focus to the page.
ClickOnView(VIEW_ID_TAB_CONTAINER);
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Now press Ctrl+F again and focus should move to the Find box.
#if defined(OS_MACOSX)
@@ -836,7 +836,7 @@
browser()->ShowHistoryTab();
ASSERT_NO_FATAL_FAILURE(ui_test_utils::WaitForLoadStop(
browser()->GetSelectedWebContents()));
- EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Open the new tab, focus should be on the location bar.
browser()->NewTab();
@@ -848,7 +848,7 @@
browser()->ShowDownloadsTab();
ASSERT_NO_FATAL_FAILURE(ui_test_utils::WaitForLoadStop(
browser()->GetSelectedWebContents()));
- EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
// Open about:blank, focus should be on the location bar.
browser()->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
@@ -901,7 +901,7 @@
// Focus should now be on the tab contents.
browser()->ShowDownloadsTab();
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
}
// Tests that focus goes where expected when using reload on a crashed tab.
@@ -924,7 +924,7 @@
// Focus should now be on the tab contents.
browser()->ShowDownloadsTab();
- ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
+ ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
}
} // namespace
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/browser_keyevents_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698