summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_management_browsertest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_management_browsertest.cc')
-rw-r--r--chrome/browser/extensions/extension_management_browsertest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_management_browsertest.cc b/chrome/browser/extensions/extension_management_browsertest.cc
index 01348c9..ff94bfa 100644
--- a/chrome/browser/extensions/extension_management_browsertest.cc
+++ b/chrome/browser/extensions/extension_management_browsertest.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extensions_service.h"
+#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/extensions/extension_updater.h"
#include "chrome/browser/profile.h"
#include "chrome/common/url_constants.h"
@@ -208,10 +209,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, AutoUpdate) {
basedir.AppendASCII("v2.crx"));
// Install version 1 of the extension.
+ ExtensionTestMessageListener listener1("v1 installed");
ExtensionsService* service = browser()->profile()->GetExtensionsService();
const size_t size_before = service->extensions()->size();
ASSERT_TRUE(service->disabled_extensions()->empty());
ASSERT_TRUE(InstallExtension(basedir.AppendASCII("v1.crx"), 1));
+ listener1.WaitUntilSatisfied();
const ExtensionList* extensions = service->extensions();
ASSERT_EQ(size_before + 1, extensions->size());
ASSERT_TRUE(service->HasInstalledExtensions());
@@ -223,8 +226,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, AutoUpdate) {
service->updater()->set_blacklist_checks_enabled(false);
// Run autoupdate and make sure version 2 of the extension was installed.
+ ExtensionTestMessageListener listener2("v2 installed");
service->updater()->CheckNow();
ASSERT_TRUE(WaitForExtensionInstall());
+ listener2.WaitUntilSatisfied();
extensions = service->extensions();
ASSERT_EQ(size_before + 1, extensions->size());
ASSERT_EQ("ogjcoiohnmldgjemafoockdghcjciccf",