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

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

Issue 12211139: Phase out BrowserList::empty() and BrowserList::size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos Created 7 years, 10 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/test/base/in_process_browser_test.cc ('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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698