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/extensions/extension_garbage_collector_chromeos.h" | 5 #include "chrome/browser/extensions/extension_garbage_collector_chromeos.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 namespace { | 37 namespace { |
38 const char kExtensionId1[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; | 38 const char kExtensionId1[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; |
39 const char kExtensionId2[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; | 39 const char kExtensionId2[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; |
40 } // namespace | 40 } // namespace |
41 | 41 |
42 namespace extensions { | 42 namespace extensions { |
43 | 43 |
44 class ExtensionGarbageCollectorChromeOSUnitTest | 44 class ExtensionGarbageCollectorChromeOSUnitTest |
45 : public ExtensionServiceTestBase { | 45 : public ExtensionServiceTestBase { |
46 protected: | 46 protected: |
47 const base::FilePath& cache_dir() { return cache_dir_.path(); } | 47 const base::FilePath& cache_dir() { return cache_dir_.GetPath(); } |
48 | 48 |
49 void SetUp() override { | 49 void SetUp() override { |
50 #if defined(ENABLE_PLUGINS) | 50 #if defined(ENABLE_PLUGINS) |
51 content::PluginService::GetInstance()->Init(); | 51 content::PluginService::GetInstance()->Init(); |
52 #endif | 52 #endif |
53 InitializeGoodInstalledExtensionService(); | 53 InitializeGoodInstalledExtensionService(); |
54 | 54 |
55 // Need real IO thread. | 55 // Need real IO thread. |
56 service_->SetFileTaskRunnerForTesting( | 56 service_->SetFileTaskRunnerForTesting( |
57 content::BrowserThread::GetBlockingPool() | 57 content::BrowserThread::GetBlockingPool() |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 const base::DictionaryValue* shared_extensions = testing_local_state_.Get()-> | 191 const base::DictionaryValue* shared_extensions = testing_local_state_.Get()-> |
192 GetDictionary(ExtensionAssetsManagerChromeOS::kSharedExtensions); | 192 GetDictionary(ExtensionAssetsManagerChromeOS::kSharedExtensions); |
193 ASSERT_TRUE(shared_extensions); | 193 ASSERT_TRUE(shared_extensions); |
194 | 194 |
195 EXPECT_FALSE(shared_extensions->HasKey(kExtensionId1)); | 195 EXPECT_FALSE(shared_extensions->HasKey(kExtensionId1)); |
196 EXPECT_TRUE(shared_extensions->HasKey(kExtensionId2)); | 196 EXPECT_TRUE(shared_extensions->HasKey(kExtensionId2)); |
197 } | 197 } |
198 | 198 |
199 } // namespace extensions | 199 } // namespace extensions |
OLD | NEW |