summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 22:06:21 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 22:06:21 +0000
commit793a44525cfc6932e65f181d081feca7fa13b809 (patch)
tree4eda50dd03fb9315081f1b0dddb9eb4b43759e60
parent1fd60260027fd803432e3bccdc51a690e434f3a3 (diff)
downloadchromium_src-793a44525cfc6932e65f181d081feca7fa13b809.zip
chromium_src-793a44525cfc6932e65f181d081feca7fa13b809.tar.gz
chromium_src-793a44525cfc6932e65f181d081feca7fa13b809.tar.bz2
Take 2: Disable the test (I accidentally modified the file before checking in in my last checkin and added things I was working on but didn't want checked in yet). :/
TBR=oshima BUG=http://crbug.com/28629, http://crbug.com/16447 TEST=None Review URL: http://codereview.chromium.org/554041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36797 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/find_bar_host_browsertest.cc65
1 files changed, 8 insertions, 57 deletions
diff --git a/chrome/browser/views/find_bar_host_browsertest.cc b/chrome/browser/views/find_bar_host_browsertest.cc
index a50c27b..26ca3cf 100644
--- a/chrome/browser/views/find_bar_host_browsertest.cc
+++ b/chrome/browser/views/find_bar_host_browsertest.cc
@@ -155,10 +155,9 @@ std::string FocusedOnPage(TabContents* tab_contents) {
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 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
// 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 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
// 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 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
// 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();