diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 22:57:54 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 22:57:54 +0000 |
commit | a109d02492863aeb537dea09bfb445eb6f5d94c5 (patch) | |
tree | bd3d2e9a783179eb2582f0055192b97e8d248547 /chrome/browser/browser_focus_uitest.cc | |
parent | 3c30f4c1e5f2bdb4f5d198c4a9ea18cc8045ddea (diff) | |
download | chromium_src-a109d02492863aeb537dea09bfb445eb6f5d94c5.zip chromium_src-a109d02492863aeb537dea09bfb445eb6f5d94c5.tar.gz chromium_src-a109d02492863aeb537dea09bfb445eb6f5d94c5.tar.bz2 |
Removed the last Windows specific part out of the focus manager. HWNDs are not subclassed anymore.The FocusManager is now created and owned by top-level WidgetWins.BUG=NoneTEST=Run the unit tests, UI tests, interactive UI tests. Fully test the focus behavior in the browser: activate/deactivate the browser windows, make sure focus is remembered. Switch tabs, make sure focus is remembered for each tab. make sure accelerators work as expected. Test focus traversal in a web page, in the option dialog.
Review URL: http://codereview.chromium.org/125148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_focus_uitest.cc')
-rw-r--r-- | chrome/browser/browser_focus_uitest.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc index 3681c1b..8aebfcf 100644 --- a/chrome/browser/browser_focus_uitest.cc +++ b/chrome/browser/browser_focus_uitest.cc @@ -108,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BrowsersRememberFocus) { BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(hwnd); ASSERT_TRUE(browser_view); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); ASSERT_TRUE(focus_manager); EXPECT_EQ(browser_view->GetTabContentsContainerView(), @@ -149,7 +149,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BrowsersRememberFocus) { BrowserView::GetBrowserViewForNativeWindow(hwnd2); ASSERT_TRUE(browser_view2); views::FocusManager* focus_manager2 = - views::FocusManager::GetFocusManager(hwnd2); + views::FocusManager::GetFocusManagerForNativeView(hwnd2); ASSERT_TRUE(focus_manager2); EXPECT_EQ(browser_view2->GetTabContentsContainerView(), focus_manager2->GetFocusedView()); @@ -183,13 +183,13 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, TabsRememberFocus) { ASSERT_TRUE(browser_view); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); ASSERT_TRUE(focus_manager); // Create several tabs. for (int i = 0; i < 4; ++i) { - browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, true, -1, false, - NULL); + browser()->AddTabWithURL(url, GURL(), PageTransition::TYPED, true, -1, + false, NULL); } // Alternate focus for the tab. @@ -283,7 +283,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, LocationBarLockFocus) { HWND hwnd = reinterpret_cast<HWND>(browser()->window()->GetNativeHandle()); BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(hwnd); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); // Click on the location bar. LocationBarView* location_bar = browser_view->GetLocationBarView(); @@ -311,7 +311,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusTraversal) { HWND hwnd = reinterpret_cast<HWND>(browser()->window()->GetNativeHandle()); BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(hwnd); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); // Click on the location bar. LocationBarView* location_bar = browser_view->GetLocationBarView(); @@ -401,7 +401,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusTraversalOnInterstitial) { HWND hwnd = reinterpret_cast<HWND>(browser()->window()->GetNativeHandle()); BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(hwnd); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); // Focus should be on the page. EXPECT_EQ(browser_view->GetTabContentsContainerView(), @@ -496,7 +496,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, InterstitialFocus) { HWND hwnd = reinterpret_cast<HWND>(browser()->window()->GetNativeHandle()); BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(hwnd); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); // Page should have focus. EXPECT_EQ(browser_view->GetTabContentsContainerView(), @@ -541,7 +541,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) { HWND hwnd = reinterpret_cast<HWND>(browser()->window()->GetNativeHandle()); BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(hwnd); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); LocationBarView* location_bar = browser_view->GetLocationBarView(); // Press Ctrl+F, which will make the Find box open and request focus. @@ -613,7 +613,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, TabInitialFocus) { BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(hwnd); ASSERT_TRUE(browser_view); views::FocusManager* focus_manager = - views::FocusManager::GetFocusManager(hwnd); + views::FocusManager::GetFocusManagerForNativeView(hwnd); ASSERT_TRUE(focus_manager); // Open the history tab, focus should be on the tab contents. |