OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/apps/drive/drive_app_mapping.h" | 5 #include "chrome/browser/apps/drive/drive_app_mapping.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/test/base/testing_pref_service_syncable.h" | 9 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 class DriveAppMappingTest : public testing::Test { | 12 class DriveAppMappingTest : public testing::Test { |
13 public: | 13 public: |
14 DriveAppMappingTest() {} | 14 DriveAppMappingTest() {} |
15 ~DriveAppMappingTest() override {} | 15 ~DriveAppMappingTest() override {} |
16 | 16 |
17 // testing::Test: | 17 // testing::Test: |
18 void SetUp() override { | 18 void SetUp() override { |
19 pref_service_.reset(new TestingPrefServiceSyncable); | 19 pref_service_.reset(new TestingPrefServiceSyncable); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 TEST_F(DriveAppMappingTest, TrackUninstall) { | 118 TEST_F(DriveAppMappingTest, TrackUninstall) { |
119 const std::string drive_app_id = "drive-1"; | 119 const std::string drive_app_id = "drive-1"; |
120 | 120 |
121 mapping()->AddUninstalledDriveApp(drive_app_id); | 121 mapping()->AddUninstalledDriveApp(drive_app_id); |
122 EXPECT_TRUE(mapping()->IsUninstalledDriveApp(drive_app_id)); | 122 EXPECT_TRUE(mapping()->IsUninstalledDriveApp(drive_app_id)); |
123 | 123 |
124 mapping()->RemoveUninstalledDriveApp(drive_app_id); | 124 mapping()->RemoveUninstalledDriveApp(drive_app_id); |
125 EXPECT_FALSE(mapping()->IsUninstalledDriveApp(drive_app_id)); | 125 EXPECT_FALSE(mapping()->IsUninstalledDriveApp(drive_app_id)); |
126 } | 126 } |
OLD | NEW |