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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_CrashEscHandlers) { 66 IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_CrashEscHandlers) {
67 ASSERT_TRUE(test_server()->Start()); 67 ASSERT_TRUE(test_server()->Start());
68 68
69 // First we navigate to our test page (tab A). 69 // First we navigate to our test page (tab A).
70 GURL url = test_server()->GetURL(kSimplePage); 70 GURL url = test_server()->GetURL(kSimplePage);
71 ui_test_utils::NavigateToURL(browser(), url); 71 ui_test_utils::NavigateToURL(browser(), url);
72 72
73 browser()->Find(); 73 browser()->Find();
74 74
75 // Open another tab (tab B). 75 // Open another tab (tab B).
76 browser()->AddSelectedTabWithURL(url, PageTransition::TYPED); 76 browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
77 77
78 browser()->Find(); 78 browser()->Find();
79 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), 79 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
80 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 80 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
81 81
82 // Select tab A. 82 // Select tab A.
83 browser()->ActivateTabAt(0, true); 83 browser()->ActivateTabAt(0, true);
84 84
85 // Close tab B. 85 // Close tab B.
86 browser()->CloseTabContents(browser()->GetTabContentsAt(1)); 86 browser()->CloseTabContents(browser()->GetTabContentsAt(1));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 browser()->GetFindBarController()->find_bar()->GetFindBarTesting(); 157 browser()->GetFindBarController()->find_bar()->GetFindBarTesting();
158 158
159 // Search for 'a'. 159 // Search for 'a'.
160 ui_test_utils::FindInPage(browser()->GetSelectedTabContentsWrapper(), 160 ui_test_utils::FindInPage(browser()->GetSelectedTabContentsWrapper(),
161 ASCIIToUTF16("a"), true, false, NULL); 161 ASCIIToUTF16("a"), true, false, NULL);
162 EXPECT_TRUE(ASCIIToUTF16("a") == find_bar->GetFindSelectedText()); 162 EXPECT_TRUE(ASCIIToUTF16("a") == find_bar->GetFindSelectedText());
163 163
164 // Open another tab (tab B). 164 // Open another tab (tab B).
165 ui_test_utils::WindowedNotificationObserver observer( 165 ui_test_utils::WindowedNotificationObserver observer(
166 content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources()); 166 content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
167 browser()->AddSelectedTabWithURL(url, PageTransition::TYPED); 167 browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
168 observer.Wait(); 168 observer.Wait();
169 169
170 // Make sure Find box is open. 170 // Make sure Find box is open.
171 browser()->Find(); 171 browser()->Find();
172 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), 172 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
173 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 173 VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
174 174
175 // Search for 'b'. 175 // Search for 'b'.
176 ui_test_utils::FindInPage(browser()->GetSelectedTabContentsWrapper(), 176 ui_test_utils::FindInPage(browser()->GetSelectedTabContentsWrapper(),
177 ASCIIToUTF16("b"), true, false, NULL); 177 ASCIIToUTF16("b"), true, false, NULL);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source); 338 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source);
339 339
340 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 340 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
341 browser(), ui::VKEY_V, true, false, false, false)); 341 browser(), ui::VKEY_V, true, false, false, false));
342 342
343 ASSERT_NO_FATAL_FAILURE(observer.Wait()); 343 ASSERT_NO_FATAL_FAILURE(observer.Wait());
344 FindNotificationDetails details; 344 FindNotificationDetails details;
345 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details)); 345 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details));
346 EXPECT_TRUE(details.number_of_matches() > 0); 346 EXPECT_TRUE(details.number_of_matches() > 0);
347 } 347 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.cc ('k') | chrome/browser/ui/views/instant_confirm_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698