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

Side by Side Diff: chrome/test/base/ui_test_utils.cc

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 years, 4 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 | « chrome/chrome_browser.gypi ('k') | 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 "chrome/test/base/ui_test_utils.h" 5 #include "chrome/test/base/ui_test_utils.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 FindInPageNotificationObserver observer(tab_contents); 377 FindInPageNotificationObserver observer(tab_contents);
378 if (ordinal) 378 if (ordinal)
379 *ordinal = observer.active_match_ordinal(); 379 *ordinal = observer.active_match_ordinal();
380 if (selection_rect) 380 if (selection_rect)
381 *selection_rect = observer.selection_rect(); 381 *selection_rect = observer.selection_rect();
382 return observer.number_of_matches(); 382 return observer.number_of_matches();
383 } 383 }
384 384
385 void CloseAllInfoBars(TabContents* tab) { 385 void CloseAllInfoBars(TabContents* tab) {
386 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); 386 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
387 while (infobar_helper->infobar_count() > 0) 387 while (infobar_helper->GetInfoBarCount() > 0)
388 infobar_helper->RemoveInfoBar(infobar_helper->GetInfoBarDelegateAt(0)); 388 infobar_helper->RemoveInfoBar(infobar_helper->GetInfoBarDelegateAt(0));
389 } 389 }
390 390
391 void RegisterAndWait(content::NotificationObserver* observer, 391 void RegisterAndWait(content::NotificationObserver* observer,
392 int type, 392 int type,
393 const content::NotificationSource& source) { 393 const content::NotificationSource& source) {
394 content::NotificationRegistrar registrar; 394 content::NotificationRegistrar registrar;
395 registrar.Add(observer, type, source); 395 registrar.Add(observer, type, source);
396 content::RunMessageLoop(); 396 content::RunMessageLoop();
397 } 397 }
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 int state, 709 int state,
710 const base::Closure& followup) { 710 const base::Closure& followup) {
711 if (!followup.is_null()) 711 if (!followup.is_null())
712 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup); 712 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup);
713 else 713 else
714 ui_controls::SendMouseEvents(button, state); 714 ui_controls::SendMouseEvents(button, state);
715 } 715 }
716 716
717 } // namespace internal 717 } // namespace internal
718 } // namespace ui_test_utils 718 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698