summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 13:07:45 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-19 13:07:45 +0000
commit3c202abd061f35e1655fe230b358d9fc46e00053 (patch)
tree9f181a22644b532da82b4acd68c1c2a1e90ace21 /chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
parent977177d649da96eebe98fb46ed0a8e47acc64986 (diff)
downloadchromium_src-3c202abd061f35e1655fe230b358d9fc46e00053.zip
chromium_src-3c202abd061f35e1655fe230b358d9fc46e00053.tar.gz
chromium_src-3c202abd061f35e1655fe230b358d9fc46e00053.tar.bz2
Enable one test for more debugging and remove debugging code from another test
that hasn't been problematic since it was enabled (crash was caused by an unrelated problem that has now been fixed, apparently). BUG=64304, 69882 TEST=None, just changing automated tests. Review URL: http://codereview.chromium.org/6877007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/find_bar_host_interactive_uitest.cc')
-rw-r--r--chrome/browser/ui/views/find_bar_host_interactive_uitest.cc33
1 files changed, 31 insertions, 2 deletions
diff --git a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
index 8b6ea35..5e3a915 100644
--- a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
@@ -25,6 +25,12 @@ namespace {
static const int kActionDelayMs = 500;
static const char kSimplePage[] = "files/find_in_page/simple.html";
+void Checkpoint(const char* message, const base::TimeTicks& start_time) {
+ LOG(INFO) << message << " : "
+ << (base::TimeTicks::Now() - start_time).InMilliseconds()
+ << " ms" << std::flush;
+}
+
class FindInPageTest : public InProcessBrowserTest {
public:
FindInPageTest() {
@@ -171,12 +177,13 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestoreOnTabSwitch) {
// This tests that whenever you clear values from the Find box and close it that
// it respects that and doesn't show you the last search, as reported in bug:
// http://crbug.com/40121.
-// Crashy, http://crbug.com/69882.
-IN_PROC_BROWSER_TEST_F(FindInPageTest, DISABLED_PrepopulateRespectBlank) {
+IN_PROC_BROWSER_TEST_F(FindInPageTest, PrepopulateRespectBlank) {
#if defined(OS_MACOSX)
// FindInPage on Mac doesn't use prepopulated values. Search there is global.
return;
#endif
+ base::TimeTicks start_time = base::TimeTicks::Now();
+ Checkpoint("Test starting", start_time);
ASSERT_TRUE(test_server()->Start());
@@ -184,13 +191,19 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, DISABLED_PrepopulateRespectBlank) {
// won't do anything and the test will hang.
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
+ Checkpoint("Navigate", start_time);
+
// First we navigate to any page.
GURL url = test_server()->GetURL(kSimplePage);
ui_test_utils::NavigateToURL(browser(), url);
+ Checkpoint("Show Find bar", start_time);
+
// Show the Find bar.
browser()->GetFindBarController()->Show();
+ Checkpoint("Search for 'a'", start_time);
+
// Search for "a".
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_A, false, false, false, false));
@@ -198,6 +211,8 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, DISABLED_PrepopulateRespectBlank) {
// We should find "a" here.
EXPECT_EQ(ASCIIToUTF16("a"), GetFindBarText());
+ Checkpoint("Delete 'a'", start_time);
+
// Delete "a".
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_BACK, false, false, false, false));
@@ -205,26 +220,40 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, DISABLED_PrepopulateRespectBlank) {
// Validate we have cleared the text.
EXPECT_EQ(string16(), GetFindBarText());
+ Checkpoint("Close find bar", start_time);
+
// Close the Find box.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_ESCAPE, false, false, false, false));
+ Checkpoint("Show Find bar", start_time);
+
// Show the Find bar.
browser()->GetFindBarController()->Show();
+ Checkpoint("Validate text", start_time);
+
// After the Find box has been reopened, it should not have been prepopulated
// with "a" again.
EXPECT_EQ(string16(), GetFindBarText());
+ Checkpoint("Close Find bar", start_time);
+
// Close the Find box.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_ESCAPE, false, false, false, false));
+ Checkpoint("FindNext", start_time);
+
// Press F3 to trigger FindNext.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), ui::VKEY_F3, false, false, false, false));
+ Checkpoint("Validate", start_time);
+
// After the Find box has been reopened, it should still have no prepopulate
// value.
EXPECT_EQ(string16(), GetFindBarText());
+
+ Checkpoint("Test done", start_time);
}