summaryrefslogtreecommitdiffstats
path: root/chrome/browser/apps/drive/drive_app_mapping_unittest.cc
diff options
context:
space:
mode:
authorxiyuan <xiyuan@chromium.org>2014-10-14 17:06:22 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-15 00:07:38 +0000
commit37407a705b39f79bf8a4d5c058982f8ef0b58a5c (patch)
tree6c330ea4ca83e938bde9dc3d289cd917929518b6 /chrome/browser/apps/drive/drive_app_mapping_unittest.cc
parent5e894e695b9fa55e238c306d49b57096f8fed405 (diff)
downloadchromium_src-37407a705b39f79bf8a4d5c058982f8ef0b58a5c.zip
chromium_src-37407a705b39f79bf8a4d5c058982f8ef0b58a5c.tar.gz
chromium_src-37407a705b39f79bf8a4d5c058982f8ef0b58a5c.tar.bz2
app_list: Respect user uninstall of unremovable Drive app.
- Re-enable Drive app integration for ChromeOS; - Make AppListSyncableService track uninstalled Drive apps; - Make DriveAppMapping caches the uninstalled Drive apps locally; - Make DriveAppProvider skip installing of uninstalled Drive apps; BUG=420034 Review URL: https://codereview.chromium.org/650313002 Cr-Commit-Position: refs/heads/master@{#299589}
Diffstat (limited to 'chrome/browser/apps/drive/drive_app_mapping_unittest.cc')
-rw-r--r--chrome/browser/apps/drive/drive_app_mapping_unittest.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/apps/drive/drive_app_mapping_unittest.cc b/chrome/browser/apps/drive/drive_app_mapping_unittest.cc
index 1c50d48..0698d14 100644
--- a/chrome/browser/apps/drive/drive_app_mapping_unittest.cc
+++ b/chrome/browser/apps/drive/drive_app_mapping_unittest.cc
@@ -114,3 +114,13 @@ TEST_F(DriveAppMappingTest, Remove) {
drive_app_ids = mapping()->GetDriveAppIds();
EXPECT_EQ(0u, drive_app_ids.size());
}
+
+TEST_F(DriveAppMappingTest, TrackUninstall) {
+ const std::string drive_app_id = "drive-1";
+
+ mapping()->AddUninstalledDriveApp(drive_app_id);
+ EXPECT_TRUE(mapping()->IsUninstalledDriveApp(drive_app_id));
+
+ mapping()->RemoveUninstalledDriveApp(drive_app_id);
+ EXPECT_FALSE(mapping()->IsUninstalledDriveApp(drive_app_id));
+}