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

Side by Side Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 10446010: wip: Add ui::EventType parameter. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wip - views_unittests 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/string16.h" 6 #include "base/string16.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, AcceleratorRestoring) { 828 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, AcceleratorRestoring) {
829 // First we navigate to any page. 829 // First we navigate to any page.
830 GURL url = GetURL(kSimple); 830 GURL url = GetURL(kSimple);
831 ui_test_utils::NavigateToURL(browser(), url); 831 ui_test_utils::NavigateToURL(browser(), url);
832 832
833 gfx::NativeWindow window = browser()->window()->GetNativeHandle(); 833 gfx::NativeWindow window = browser()->window()->GetNativeHandle();
834 views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window); 834 views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
835 views::FocusManager* focus_manager = widget->GetFocusManager(); 835 views::FocusManager* focus_manager = widget->GetFocusManager();
836 836
837 // See where Escape is registered. 837 // See where Escape is registered.
838 ui::Accelerator escape(ui::VKEY_ESCAPE, ui::EF_NONE); 838 ui::Accelerator escape(ui::VKEY_ESCAPE, ui::EF_NONE, ui::ET_KEY_PRESSED);
839 ui::AcceleratorTarget* old_target = 839 ui::AcceleratorTarget* old_target =
840 focus_manager->GetCurrentTargetForAccelerator(escape); 840 focus_manager->GetCurrentTargetForAccelerator(escape);
841 EXPECT_TRUE(old_target != NULL); 841 EXPECT_TRUE(old_target != NULL);
842 842
843 browser()->ShowFindBar(); 843 browser()->ShowFindBar();
844 844
845 // Our Find bar should be the new target. 845 // Our Find bar should be the new target.
846 ui::AcceleratorTarget* new_target = 846 ui::AcceleratorTarget* new_target =
847 focus_manager->GetCurrentTargetForAccelerator(escape); 847 focus_manager->GetCurrentTargetForAccelerator(escape);
848 848
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 ui_test_utils::RunAllPendingInMessageLoop(); // Needed on Linux. 1244 ui_test_utils::RunAllPendingInMessageLoop(); // Needed on Linux.
1245 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL)); 1245 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL));
1246 1246
1247 ui_test_utils::NavigateToURLWithDisposition( 1247 ui_test_utils::NavigateToURLWithDisposition(
1248 browser(), url, NEW_FOREGROUND_TAB, 1248 browser(), url, NEW_FOREGROUND_TAB,
1249 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 1249 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
1250 browser()->CloseTab(); 1250 browser()->CloseTab();
1251 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL)); 1251 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL));
1252 EXPECT_EQ(position, position2); 1252 EXPECT_EQ(position, position2);
1253 } 1253 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.cc ('k') | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698