| Index: chrome/browser/apps/drive/drive_app_provider_browsertest.cc
|
| diff --git a/chrome/browser/apps/drive/drive_app_provider_browsertest.cc b/chrome/browser/apps/drive/drive_app_provider_browsertest.cc
|
| index cb46e960f0c6086e27c4e759548f2bfddc1c3f81..b60fff1ad6fe009252fe5a92fb2df7de5683a9c0 100644
|
| --- a/chrome/browser/apps/drive/drive_app_provider_browsertest.cc
|
| +++ b/chrome/browser/apps/drive/drive_app_provider_browsertest.cc
|
| @@ -277,11 +277,11 @@
|
| kDriveAppId, kDriveAppName, kChromeAppId, kLaunchUrl, true);
|
| RefreshDriveAppRegistry();
|
| WaitForPendingDriveAppConverters();
|
| - ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
|
|
|
| // An Url app should be created.
|
| - const Extension* url_app = registry->GetExtensionById(
|
| - mapping()->GetChromeApp(kDriveAppId), ExtensionRegistry::EVERYTHING);
|
| + const Extension* url_app =
|
| + ExtensionRegistry::Get(profile())->GetExtensionById(
|
| + mapping()->GetChromeApp(kDriveAppId), ExtensionRegistry::EVERYTHING);
|
| EXPECT_TRUE(url_app->is_hosted_app());
|
| EXPECT_TRUE(url_app->from_bookmark());
|
|
|
| @@ -290,20 +290,16 @@
|
| EXPECT_EQ(url_app_id, mapping()->GetChromeApp(kDriveAppId));
|
| EXPECT_TRUE(mapping()->IsChromeAppGenerated(url_app_id));
|
|
|
| - // Install a chrome app with matching id.
|
| - size_t num_before = registry->enabled_extensions().size();
|
| - InstallChromeApp(1);
|
| - // Url app should be auto uninstalled. This happens asynchronously after the
|
| - // installation of the app that replaces it, so the task might still be
|
| - // pending.
|
| - content::RunAllPendingInMessageLoop();
|
| - EXPECT_FALSE(
|
| - registry->GetExtensionById(url_app_id, ExtensionRegistry::EVERYTHING));
|
| - EXPECT_EQ(num_before, registry->enabled_extensions().size());
|
| + // Installs a chrome app with matching id.
|
| + InstallChromeApp(0);
|
|
|
| // The Drive app should be mapped to chrome app.
|
| EXPECT_EQ(kChromeAppId, mapping()->GetChromeApp(kDriveAppId));
|
| EXPECT_FALSE(mapping()->IsChromeAppGenerated(kChromeAppId));
|
| +
|
| + // Url app should be auto uninstalled.
|
| + EXPECT_FALSE(ExtensionRegistry::Get(profile())->GetExtensionById(
|
| + url_app_id, ExtensionRegistry::EVERYTHING));
|
| }
|
|
|
| // Tests that the corresponding URL app is uninstalled when a Drive app is
|
|
|