| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |