| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "base/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 "chrome/common/pref_store.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 19 |
| 19 namespace chromeos { | 20 namespace chromeos { |
| 20 | 21 |
| 21 class SignedSettingsTempStorageTest : public ::testing::Test { | 22 class SignedSettingsTempStorageTest : public ::testing::Test { |
| 22 protected: | 23 protected: |
| 23 virtual void SetUp() { | 24 virtual void SetUp() { |
| 24 ref_map_["some_stuff"] = "a=35;code=64"; | 25 ref_map_["some_stuff"] = "a=35;code=64"; |
| 25 ref_map_["another_stuff"] = ""; | 26 ref_map_["another_stuff"] = ""; |
| 26 ref_map_["name"] = "value"; | 27 ref_map_["name"] = "value"; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 EXPECT_TRUE(SignedSettingsTempStorage::Retrieve(b_list[i]->first, &value, | 68 EXPECT_TRUE(SignedSettingsTempStorage::Retrieve(b_list[i]->first, &value, |
| 68 local_state_.get())); | 69 local_state_.get())); |
| 69 EXPECT_EQ(b_list[i]->second, value); | 70 EXPECT_EQ(b_list[i]->second, value); |
| 70 EXPECT_FALSE(SignedSettingsTempStorage::Retrieve("non-existent tv-series", | 71 EXPECT_FALSE(SignedSettingsTempStorage::Retrieve("non-existent tv-series", |
| 71 &value, | 72 &value, |
| 72 local_state_.get())); | 73 local_state_.get())); |
| 73 } | 74 } |
| 74 } | 75 } |
| 75 | 76 |
| 76 } // namespace chromeos | 77 } // namespace chromeos |
| OLD | NEW |