Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: chrome/browser/ui/views/find_bar_host_interactive_uitest.cc

Issue 10409027: Disable or mark flaky several UI tests on Win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process_util.h" 5 #include "base/process_util.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 9 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
10 #include "chrome/browser/ui/find_bar/find_notification_details.h" 10 #include "chrome/browser/ui/find_bar/find_notification_details.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 ViewID location_bar_focus_view_id_; 65 ViewID location_bar_focus_view_id_;
66 66
67 private: 67 private:
68 DISALLOW_COPY_AND_ASSIGN(FindInPageTest); 68 DISALLOW_COPY_AND_ASSIGN(FindInPageTest);
69 }; 69 };
70 70
71 } // namespace 71 } // namespace
72 72
73 IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) { 73 #if defined(OS_WIN)
74 #define MAYBE_FocusRestoreOnTabSwitch DISABLED_FocusRestoreOnTabSwitch
75 #else
76 #define MAYBE_FocusRestoreOnTabSwitch FocusRestoreOnTabSwitch
77 #endif
78 IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_CrashEscHandlers) {
74 ASSERT_TRUE(test_server()->Start()); 79 ASSERT_TRUE(test_server()->Start());
75 80
76 // First we navigate to our test page (tab A). 81 // First we navigate to our test page (tab A).
77 GURL url = test_server()->GetURL(kSimplePage); 82 GURL url = test_server()->GetURL(kSimplePage);
78 ui_test_utils::NavigateToURL(browser(), url); 83 ui_test_utils::NavigateToURL(browser(), url);
79 84
80 browser()->Find(); 85 browser()->Find();
81 86
82 // Open another tab (tab B). 87 // Open another tab (tab B).
83 browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED); 88 browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 browser()->GetFindBarController()->Show(); 152 browser()->GetFindBarController()->Show();
148 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), 153 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
149 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 154 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
150 browser()->GetFindBarController()->EndFindSession( 155 browser()->GetFindBarController()->EndFindSession(
151 FindBarController::kKeepSelectionOnPage, 156 FindBarController::kKeepSelectionOnPage,
152 FindBarController::kKeepResultsInFindBox); 157 FindBarController::kKeepResultsInFindBox);
153 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), 158 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
154 location_bar_focus_view_id_)); 159 location_bar_focus_view_id_));
155 } 160 }
156 161
157 IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestoreOnTabSwitch) { 162 #if defined(OS_WIN)
163 #define MAYBE_FocusRestoreOnTabSwitch FLAKY_FocusRestoreOnTabSwitch
164 #else
165 #define MAYBE_FocusRestoreOnTabSwitch FocusRestoreOnTabSwitch
166 #endif
167 IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_FocusRestoreOnTabSwitch) {
158 ASSERT_TRUE(test_server()->Start()); 168 ASSERT_TRUE(test_server()->Start());
159 169
160 // First we navigate to our test page (tab A). 170 // First we navigate to our test page (tab A).
161 GURL url = test_server()->GetURL(kSimplePage); 171 GURL url = test_server()->GetURL(kSimplePage);
162 ui_test_utils::NavigateToURL(browser(), url); 172 ui_test_utils::NavigateToURL(browser(), url);
163 173
164 browser()->Find(); 174 browser()->Find();
165 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), 175 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
166 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 176 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
167 177
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source); 365 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source);
356 366
357 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 367 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
358 browser(), ui::VKEY_V, true, false, false, false)); 368 browser(), ui::VKEY_V, true, false, false, false));
359 369
360 ASSERT_NO_FATAL_FAILURE(observer.Wait()); 370 ASSERT_NO_FATAL_FAILURE(observer.Wait());
361 FindNotificationDetails details; 371 FindNotificationDetails details;
362 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details)); 372 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details));
363 EXPECT_TRUE(details.number_of_matches() > 0); 373 EXPECT_TRUE(details.number_of_matches() > 0);
364 } 374 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/button_dropdown_test.cc ('k') | chrome/browser/ui/views/menu_item_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698