OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/signed_settings_temp_storage.h" | 5 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/scoped_temp_dir.h" | 14 #include "base/scoped_temp_dir.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/common/logging_chrome.h" | 16 #include "chrome/common/logging_chrome.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 class SignedSettingsTempStorageTest : public ::testing::Test { | 21 class SignedSettingsTempStorageTest : public ::testing::Test { |
22 protected: | 22 protected: |
23 virtual void SetUp() { | 23 virtual void SetUp() { |
24 ref_map_["some_stuff"] = "a=35;code=64"; | 24 ref_map_["some_stuff"] = "a=35;code=64"; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 EXPECT_TRUE(SignedSettingsTempStorage::Retrieve(b_list[i]->first, &value, | 68 EXPECT_TRUE(SignedSettingsTempStorage::Retrieve(b_list[i]->first, &value, |
69 local_state_.get())); | 69 local_state_.get())); |
70 EXPECT_EQ(b_list[i]->second, value); | 70 EXPECT_EQ(b_list[i]->second, value); |
71 EXPECT_FALSE(SignedSettingsTempStorage::Retrieve("non-existent tv-series", | 71 EXPECT_FALSE(SignedSettingsTempStorage::Retrieve("non-existent tv-series", |
72 &value, | 72 &value, |
73 local_state_.get())); | 73 local_state_.get())); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 } // namespace chromeos | 77 } // namespace chromeos |
OLD | NEW |