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

Unified Diff: chrome/browser/extensions/window_open_apitest.cc

Issue 1644773003: Remove BrowserIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-desktop-1
Patch Set: . Created 4 years, 11 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/extensions/extension_tab_util.cc ('k') | chrome/browser/fast_shutdown_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/window_open_apitest.cc
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc
index a27ebb572d80374c22730edaec075070678cf718..5cc06773b1c639366333688dfc8f9a0fc0001465 100644
--- a/chrome/browser/extensions/window_open_apitest.cc
+++ b/chrome/browser/extensions/window_open_apitest.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/profiles/profile.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/panels/panel_manager.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_paths.h"
@@ -99,11 +99,11 @@ bool WaitForTabsAndPopups(Browser* browser,
EXPECT_EQ(num_panels, GetPanelCount(browser));
int num_popups_seen = 0;
- for (chrome::BrowserIterator iter; !iter.done(); iter.Next()) {
- if (*iter == browser)
+ for (auto* b : *BrowserList::GetInstance()) {
+ if (b == browser)
continue;
- EXPECT_TRUE((*iter)->is_type_popup());
+ EXPECT_TRUE(b->is_type_popup());
++num_popups_seen;
}
EXPECT_EQ(num_popups, num_popups_seen);
@@ -124,11 +124,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, BrowserIsApp) {
EXPECT_TRUE(WaitForTabsAndPopups(browser(), 0, 2, 0));
- for (chrome::BrowserIterator iter; !iter.done(); iter.Next()) {
- if (*iter == browser())
- ASSERT_FALSE(iter->is_app());
+ for (auto* b : *BrowserList::GetInstance()) {
+ if (b == browser())
+ ASSERT_FALSE(b->is_app());
else
- ASSERT_TRUE(iter->is_app());
+ ASSERT_TRUE(b->is_app());
}
}
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.cc ('k') | chrome/browser/fast_shutdown_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698