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

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

Issue 10113005: Remove EPM:all_hosts_ and use all_extension_views_ instead. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: interactive_ui_tests Created 8 years, 8 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
Index: chrome/browser/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index f8358fa173e148a59a0eeb3c9c1b298914e8e316..0bab1eabf2b929e2451db63e8ec097dea9d2ac6f 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -31,6 +31,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_contents.h"
ExtensionBrowserTest::ExtensionBrowserTest()
: loaded_(false),
@@ -395,9 +396,11 @@ bool ExtensionBrowserTest::WaitForExtensionHostsToLoad() {
ExtensionProcessManager* manager =
browser()->profile()->GetExtensionProcessManager();
- for (ExtensionProcessManager::const_iterator iter = manager->begin();
- iter != manager->end();) {
- if ((*iter)->did_stop_loading()) {
+ ExtensionProcessManager::ContentsSet all_contents = manager->GetAllContents();
+ for (ExtensionProcessManager::ContentsSet::const_iterator iter =
+ all_contents.begin();
+ iter != all_contents.end();) {
+ if (!(*iter)->IsLoading()) {
++iter;
} else {
ui_test_utils::RunMessageLoop();
@@ -405,7 +408,7 @@ bool ExtensionBrowserTest::WaitForExtensionHostsToLoad() {
// Test activity may have modified the set of extension processes during
// message processing, so re-start the iteration to catch added/removed
// processes.
- iter = manager->begin();
+ iter = all_contents.begin();
}
}
return true;

Powered by Google App Engine
This is Rietveld 408576698