| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/policy/cloud_external_data_store.h" | 5 #include "chrome/browser/chromeos/policy/cloud_external_data_store.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/test/test_simple_task_runner.h" | 10 #include "base/test/test_simple_task_runner.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const char kData2[] = "Testing data 2"; | 24 const char kData2[] = "Testing data 2"; |
| 25 const char kURL[] = "http://localhost"; | 25 const char kURL[] = "http://localhost"; |
| 26 const size_t kMaxSize = 100; | 26 const size_t kMaxSize = 100; |
| 27 | 27 |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| 30 class CouldExternalDataStoreTest : public testing::Test { | 30 class CouldExternalDataStoreTest : public testing::Test { |
| 31 public: | 31 public: |
| 32 CouldExternalDataStoreTest(); | 32 CouldExternalDataStoreTest(); |
| 33 | 33 |
| 34 virtual void SetUp() OVERRIDE; | 34 virtual void SetUp() override; |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 const std::string kData1Hash; | 37 const std::string kData1Hash; |
| 38 const std::string kData2Hash; | 38 const std::string kData2Hash; |
| 39 | 39 |
| 40 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; | 40 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; |
| 41 base::ScopedTempDir temp_dir_; | 41 base::ScopedTempDir temp_dir_; |
| 42 scoped_ptr<ResourceCache> resource_cache_; | 42 scoped_ptr<ResourceCache> resource_cache_; |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(CouldExternalDataStoreTest); | 44 DISALLOW_COPY_AND_ASSIGN(CouldExternalDataStoreTest); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 EXPECT_TRUE(contents.empty()); | 189 EXPECT_TRUE(contents.empty()); |
| 190 | 190 |
| 191 // Check that the part of the resource cache backing the second store is | 191 // Check that the part of the resource cache backing the second store is |
| 192 // unaffected. | 192 // unaffected. |
| 193 resource_cache_->LoadAllSubkeys(kKey2, &contents); | 193 resource_cache_->LoadAllSubkeys(kKey2, &contents); |
| 194 ASSERT_EQ(1u, contents.size()); | 194 ASSERT_EQ(1u, contents.size()); |
| 195 EXPECT_EQ(kData2, contents.begin()->second); | 195 EXPECT_EQ(kData2, contents.begin()->second); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace policy | 198 } // namespace policy |
| OLD | NEW |