| Index: chrome/browser/views/find_bar_host_browsertest.cc
|
| ===================================================================
|
| --- chrome/browser/views/find_bar_host_browsertest.cc (revision 36795)
|
| +++ chrome/browser/views/find_bar_host_browsertest.cc (working copy)
|
| @@ -155,10 +155,9 @@
|
| return result;
|
| }
|
|
|
| -// This tests the FindInPage end-state, in other words: what is focused and
|
| -// selected after you close the Find box. For example, if you find within a link
|
| -// the link should be focused, but not selection highlighted. If you find simple
|
| -// text, it should be highlighted when closing the Find box.
|
| +// This tests the FindInPage end-state, in other words: what is focused when you
|
| +// close the Find box (ie. if you find within a link the link should be
|
| +// focused).
|
| IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
|
| HTTPTestServer* server = StartHTTPServer();
|
|
|
| @@ -184,22 +183,13 @@
|
| // Verify that the link is focused.
|
| EXPECT_STREQ("link1", FocusedOnPage(tab_contents).c_str());
|
|
|
| - // Make sure nothing is highlighted (don't want both focus highlighting and
|
| - // selection highlighting at the same time).
|
| - std::string result;
|
| - ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - tab_contents->render_view_host(),
|
| - L"",
|
| - L"window.domAutomationController.send(window.getSelection().toString());",
|
| - &result);
|
| - EXPECT_STREQ("", result.c_str());
|
| -
|
| - // Search for a text that exists within link2 on the page.
|
| + // Search for a text that exists within a link on the page.
|
| EXPECT_EQ(1, FindInPageWchar(tab_contents, L"Google",
|
| kFwd, kIgnoreCase, &ordinal));
|
| EXPECT_EQ(1, ordinal);
|
|
|
| // Move the selection to link 1, after searching.
|
| + std::string result;
|
| ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| tab_contents->render_view_host(),
|
| L"",
|
| @@ -211,45 +201,6 @@
|
|
|
| // Verify that link2 is not focused.
|
| EXPECT_STREQ("", FocusedOnPage(tab_contents).c_str());
|
| -
|
| - // Make sure link1 is still highlighted.
|
| - ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - tab_contents->render_view_host(),
|
| - L"",
|
| - L"window.domAutomationController.send(window.getSelection().toString());",
|
| - &result);
|
| - EXPECT_STREQ("link", result.c_str());
|
| -
|
| - // Search for 'This'. Should have 1 match.
|
| - TabContents* tab = browser()->GetSelectedTabContents();
|
| - EXPECT_EQ(1, FindInPageWchar(tab, L"This", kFwd, kIgnoreCase, &ordinal));
|
| - EXPECT_EQ(1, ordinal);
|
| -
|
| - // End the Find session, thereby making the word 'This' highlighted.
|
| - browser()->GetFindBarController()->EndFindSession();
|
| -
|
| - // Make sure 'This' is now highlighted.
|
| - ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - tab->render_view_host(),
|
| - L"",
|
| - L"window.domAutomationController.send(window.getSelection().toString());",
|
| - &result);
|
| - EXPECT_STREQ("This", result.c_str());
|
| -
|
| - // Search for something that doesn't exist (or at least not on that page).
|
| - EXPECT_EQ(0, FindInPageWchar(tab, L"aliens", kFwd, kIgnoreCase, &ordinal));
|
| - EXPECT_EQ(0, ordinal);
|
| -
|
| - // End the Find session.
|
| - browser()->GetFindBarController()->EndFindSession();
|
| -
|
| - // Make sure nothing is highlighted.
|
| - ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - tab->render_view_host(),
|
| - L"",
|
| - L"window.domAutomationController.send(window.getSelection().toString());",
|
| - &result);
|
| - EXPECT_STREQ("", result.c_str());
|
| }
|
|
|
| // This test loads a single-frame page and makes sure the ordinal returned makes
|
| @@ -523,9 +474,9 @@
|
|
|
| // Make sure Find box disappears on Navigate but not on Refresh.
|
| #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS)
|
| -// The last EXPECT_FALSE(fully_visible) is flaky (especially on
|
| -// 64bit build.). See bug http://crbug.com/28629.
|
| -#define FindDisappearOnNavigate FLAKY_FindDisappearOnNavigate
|
| +// The last EXPECT_FALSE(fully_visible) is failing all the time on
|
| +// the linux_views bot. See bug: http://crbug.com/28629.
|
| +#define FindDisappearOnNavigate DISABLED_FindDisappearOnNavigate
|
| #endif
|
| IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
|
| HTTPTestServer* server = StartHTTPServer();
|
|
|