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

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

Issue 12089079: Disable FocusRestoreOnTabSwitch on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 browser()->GetFindBarController()->Show(); 164 browser()->GetFindBarController()->Show();
165 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), 165 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
166 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 166 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
167 browser()->GetFindBarController()->EndFindSession( 167 browser()->GetFindBarController()->EndFindSession(
168 FindBarController::kKeepSelectionOnPage, 168 FindBarController::kKeepSelectionOnPage,
169 FindBarController::kKeepResultsInFindBox); 169 FindBarController::kKeepResultsInFindBox);
170 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), 170 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
171 location_bar_focus_view_id_)); 171 location_bar_focus_view_id_));
172 } 172 }
173 173
174 #if defined(OS_WIN) 174 // Fails often on Win, CrOS. http://crbug.com/145476, http://crbug.com/128724
175 // crbug.com/128724 175 #if defined(OS_WIN) || defined(OS_CHROMEOS)
176 #define MAYBE_FocusRestoreOnTabSwitch DISABLED_FocusRestoreOnTabSwitch 176 #define MAYBE_FocusRestoreOnTabSwitch DISABLED_FocusRestoreOnTabSwitch
177 #else 177 #else
178 #define MAYBE_FocusRestoreOnTabSwitch FocusRestoreOnTabSwitch 178 #define MAYBE_FocusRestoreOnTabSwitch FocusRestoreOnTabSwitch
179 #endif 179 #endif
180 IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_FocusRestoreOnTabSwitch) { 180 IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_FocusRestoreOnTabSwitch) {
181 ASSERT_TRUE(test_server()->Start()); 181 ASSERT_TRUE(test_server()->Start());
182 182
183 // First we navigate to our test page (tab A). 183 // First we navigate to our test page (tab A).
184 GURL url = test_server()->GetURL(kSimplePage); 184 GURL url = test_server()->GetURL(kSimplePage);
185 ui_test_utils::NavigateToURL(browser(), url); 185 ui_test_utils::NavigateToURL(browser(), url);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source); 386 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source);
387 387
388 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 388 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
389 browser(), ui::VKEY_V, true, false, false, false)); 389 browser(), ui::VKEY_V, true, false, false, false));
390 390
391 ASSERT_NO_FATAL_FAILURE(observer.Wait()); 391 ASSERT_NO_FATAL_FAILURE(observer.Wait());
392 FindNotificationDetails details; 392 FindNotificationDetails details;
393 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details)); 393 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details));
394 EXPECT_TRUE(details.number_of_matches() > 0); 394 EXPECT_TRUE(details.number_of_matches() > 0);
395 } 395 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698