diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-28 20:12:36 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-28 20:12:36 +0000 |
commit | 68592b9b551acc83c232e92d7adb7ca10c4501af (patch) | |
tree | 4404891025f57878f8ae201d099818d1d82d38a7 | |
parent | 0e8783948ac1235ee5035879c72e67d8da2f194b (diff) | |
download | chromium_src-68592b9b551acc83c232e92d7adb7ca10c4501af.zip chromium_src-68592b9b551acc83c232e92d7adb7ca10c4501af.tar.gz chromium_src-68592b9b551acc83c232e92d7adb7ca10c4501af.tar.bz2 |
Fix for the redness in the interactive test. We were using GetActiveWindow to get the Browser window, which internally uses ::GetForegroundWindow(). This means that when other application windows are on top we fail to get the Browser window. By switching to GetLastActiveWindow() we avoid that.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1498 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/find_in_page_controller_interactive_uitest.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/find_in_page_controller_interactive_uitest.cc b/chrome/browser/find_in_page_controller_interactive_uitest.cc index 0e8f5ff..203b1ca 100644 --- a/chrome/browser/find_in_page_controller_interactive_uitest.cc +++ b/chrome/browser/find_in_page_controller_interactive_uitest.cc @@ -54,11 +54,11 @@ bool ActivateTabByClick(AutomationProxy* automation, TEST_F(FindInPageTest, CrashEscHandlers) { TestServer server(kDocRoot); - scoped_ptr<WindowProxy> window(automation()->GetActiveWindow()); - EXPECT_TRUE(window.get() != NULL); - - scoped_ptr<BrowserProxy> browser(automation()-> - GetBrowserForWindow(window.get())); + scoped_ptr<BrowserProxy> browser(automation()->GetLastActiveBrowserWindow()); + ASSERT_TRUE(browser.get() != NULL); + scoped_ptr<WindowProxy> window( + automation()->GetWindowForBrowser(browser.get())); + ASSERT_TRUE(window.get() != NULL); // First we navigate to our test page (tab A). GURL url = server.TestServerPageW(kSimplePage); @@ -94,4 +94,3 @@ TEST_F(FindInPageTest, CrashEscHandlers) { EXPECT_TRUE(window->SimulateOSKeyPress(VK_ESCAPE, 0)); ::Sleep(kActionDelayMs); } - |