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

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

Issue 2740783003: Revert "Revert of Reland: Switch WindowedNotificationObserver to use base::RunLoop. (patchset #3 id… (Closed)
Patch Set: Fix comment. Created 3 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/chrome_extension_test_notification_observer.cc
diff --git a/chrome/browser/extensions/chrome_extension_test_notification_observer.cc b/chrome/browser/extensions/chrome_extension_test_notification_observer.cc
index 7a34f44879910aad22c8a6e5cea6878e09da2dbe..cf28829595ad10711b0fe7db184fd3163cc7cbfa 100644
--- a/chrome/browser/extensions/chrome_extension_test_notification_observer.cc
+++ b/chrome/browser/extensions/chrome_extension_test_notification_observer.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/test/test_utils.h"
#include "extensions/browser/notification_types.h"
#include "extensions/browser/process_manager.h"
#include "extensions/common/extension.h"
@@ -80,6 +81,10 @@ bool ChromeExtensionTestNotificationObserver::
}
bool ChromeExtensionTestNotificationObserver::WaitForExtensionViewsToLoad() {
+ // Some views might be not created yet. This call may become insufficient if
+ // e.g. implementation of ExtensionHostQueue changes.
+ content::RunAllPendingInMessageLoop();
+
ProcessManager* manager = ProcessManager::Get(GetBrowserContext());
NotificationSet notification_set;
notification_set.Add(content::NOTIFICATION_WEB_CONTENTS_DESTROYED);

Powered by Google App Engine
This is Rietveld 408576698