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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 for (chrome::BrowserIterator it; !it.done(); it.Next()) | 523 for (chrome::BrowserIterator it; !it.done(); it.Next()) |
524 original_browsers_.insert(*it); | 524 original_browsers_.insert(*it); |
525 } | 525 } |
526 | 526 |
527 BrowserAddedObserver::~BrowserAddedObserver() { | 527 BrowserAddedObserver::~BrowserAddedObserver() { |
528 } | 528 } |
529 | 529 |
530 Browser* BrowserAddedObserver::WaitForSingleNewBrowser() { | 530 Browser* BrowserAddedObserver::WaitForSingleNewBrowser() { |
531 notification_observer_.Wait(); | 531 notification_observer_.Wait(); |
532 // Ensure that only a single new browser has appeared. | 532 // Ensure that only a single new browser has appeared. |
533 EXPECT_EQ(original_browsers_.size() + 1, BrowserList::size()); | 533 EXPECT_EQ(original_browsers_.size() + 1, chrome::GetTotalBrowserCount()); |
534 return GetBrowserNotInSet(original_browsers_); | 534 return GetBrowserNotInSet(original_browsers_); |
535 } | 535 } |
536 | 536 |
537 // Coordinates taking snapshots of a |RenderWidget|. | 537 // Coordinates taking snapshots of a |RenderWidget|. |
538 class SnapshotTaker { | 538 class SnapshotTaker { |
539 public: | 539 public: |
540 SnapshotTaker() : bitmap_(NULL) {} | 540 SnapshotTaker() : bitmap_(NULL) {} |
541 | 541 |
542 bool TakeRenderWidgetSnapshot(RenderWidgetHost* rwh, | 542 bool TakeRenderWidgetSnapshot(RenderWidgetHost* rwh, |
543 const gfx::Size& page_size, | 543 const gfx::Size& page_size, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 void HistoryEnumerator::HistoryQueryComplete( | 684 void HistoryEnumerator::HistoryQueryComplete( |
685 const base::Closure& quit_task, | 685 const base::Closure& quit_task, |
686 HistoryService::Handle request_handle, | 686 HistoryService::Handle request_handle, |
687 history::QueryResults* results) { | 687 history::QueryResults* results) { |
688 for (size_t i = 0; i < results->size(); ++i) | 688 for (size_t i = 0; i < results->size(); ++i) |
689 urls_.push_back((*results)[i].url()); | 689 urls_.push_back((*results)[i].url()); |
690 quit_task.Run(); | 690 quit_task.Run(); |
691 } | 691 } |
692 | 692 |
693 } // namespace ui_test_utils | 693 } // namespace ui_test_utils |
OLD | NEW |