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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc

Issue 12210067: Get rid of native-desktop-only BrowserList:: iterator methods in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r181832 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_close_browsertest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
index f21d5441e104de2744318611b3ed172cfa6ab702..6a2d4350e205e5ab1cb9e3d1d2e55ccaaf27c077 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/sessions/session_restore.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/browser_window.h"
@@ -88,10 +89,9 @@ class StartupBrowserCreatorTest : public ExtensionBrowserTest {
// Find the new browser.
Browser* other_browser = NULL;
- for (BrowserList::const_iterator i = BrowserList::begin();
- i != BrowserList::end() && !other_browser; ++i) {
- if (*i != browser())
- other_browser = *i;
+ for (chrome::BrowserIterator it; !it.done() && !other_browser; it.Next()) {
+ if (*it != browser())
+ other_browser = *it;
}
ASSERT_TRUE(other_browser);
ASSERT_TRUE(other_browser != browser());
@@ -100,10 +100,9 @@ class StartupBrowserCreatorTest : public ExtensionBrowserTest {
Browser* FindOneOtherBrowserForProfile(Profile* profile,
Browser* not_this_browser) {
- for (BrowserList::const_iterator i = BrowserList::begin();
- i != BrowserList::end(); ++i) {
- if (*i != not_this_browser && (*i)->profile() == profile)
- return *i;
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) {
+ if (*it != not_this_browser && it->profile() == profile)
+ return *it;
}
return NULL;
}
« no previous file with comments | « chrome/browser/ui/browser_close_browsertest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698