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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 tab_contents-> | 328 tab_contents-> |
329 find_tab_helper()->StartFinding(search_string, forward, match_case); | 329 find_tab_helper()->StartFinding(search_string, forward, match_case); |
330 FindInPageNotificationObserver observer(tab_contents); | 330 FindInPageNotificationObserver observer(tab_contents); |
331 if (ordinal) | 331 if (ordinal) |
332 *ordinal = observer.active_match_ordinal(); | 332 *ordinal = observer.active_match_ordinal(); |
333 return observer.number_of_matches(); | 333 return observer.number_of_matches(); |
334 } | 334 } |
335 | 335 |
336 void CloseAllInfoBars(TabContents* tab) { | 336 void CloseAllInfoBars(TabContents* tab) { |
337 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); | 337 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); |
338 while (infobar_helper->infobar_count() > 0) | 338 while (infobar_helper->GetInfoBarCount() > 0) |
339 infobar_helper->RemoveInfoBar(infobar_helper->GetInfoBarDelegateAt(0)); | 339 infobar_helper->RemoveInfoBar(infobar_helper->GetInfoBarDelegateAt(0)); |
340 } | 340 } |
341 | 341 |
342 void RegisterAndWait(content::NotificationObserver* observer, | 342 void RegisterAndWait(content::NotificationObserver* observer, |
343 int type, | 343 int type, |
344 const content::NotificationSource& source) { | 344 const content::NotificationSource& source) { |
345 content::NotificationRegistrar registrar; | 345 content::NotificationRegistrar registrar; |
346 registrar.Add(observer, type, source); | 346 registrar.Add(observer, type, source); |
347 content::RunMessageLoop(); | 347 content::RunMessageLoop(); |
348 } | 348 } |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 int state, | 660 int state, |
661 const base::Closure& followup) { | 661 const base::Closure& followup) { |
662 if (!followup.is_null()) | 662 if (!followup.is_null()) |
663 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup); | 663 ui_controls::SendMouseEventsNotifyWhenDone(button, state, followup); |
664 else | 664 else |
665 ui_controls::SendMouseEvents(button, state); | 665 ui_controls::SendMouseEvents(button, state); |
666 } | 666 } |
667 | 667 |
668 } // namespace internal | 668 } // namespace internal |
669 } // namespace ui_test_utils | 669 } // namespace ui_test_utils |
OLD | NEW |