| 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.h" | 5 #include "chrome/browser/chromeos/login/signed_settings.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/nss_util.h" | 9 #include "base/nss_util.h" |
| 10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 SignedSettings::ReturnCode expected_failure_; | 56 SignedSettings::ReturnCode expected_failure_; |
| 57 T expected_; | 57 T expected_; |
| 58 bool run_; | 58 bool run_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // anonymous namespace | 61 } // anonymous namespace |
| 62 | 62 |
| 63 class SignedSettingsTest : public ::testing::Test { | 63 class SignedSettingsTest : public ::testing::Test { |
| 64 public: | 64 public: |
| 65 SignedSettingsTest() | 65 SignedSettingsTest() |
| 66 : fake_email_("fakey"), | 66 : fake_email_("fakey@example.com"), |
| 67 fake_prop_("prop_name"), | 67 fake_prop_("prop_name"), |
| 68 fake_value_("stub"), | 68 fake_value_("stub"), |
| 69 message_loop_(MessageLoop::TYPE_UI), | 69 message_loop_(MessageLoop::TYPE_UI), |
| 70 ui_thread_(BrowserThread::UI, &message_loop_), | 70 ui_thread_(BrowserThread::UI, &message_loop_), |
| 71 file_thread_(BrowserThread::FILE), | 71 file_thread_(BrowserThread::FILE), |
| 72 mock_(new MockKeyUtils), | 72 mock_(new MockKeyUtils), |
| 73 injector_(mock_) /* injector_ takes ownership of mock_ */ { | 73 injector_(mock_) /* injector_ takes ownership of mock_ */ { |
| 74 } | 74 } |
| 75 | 75 |
| 76 virtual ~SignedSettingsTest() {} | 76 virtual ~SignedSettingsTest() {} |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 334 |
| 335 TEST_F(SignedSettingsTest, RetrievePropertyNoKey) { | 335 TEST_F(SignedSettingsTest, RetrievePropertyNoKey) { |
| 336 FailingRetrievePropertyOp(OwnerManager::KEY_UNAVAILABLE); | 336 FailingRetrievePropertyOp(OwnerManager::KEY_UNAVAILABLE); |
| 337 } | 337 } |
| 338 | 338 |
| 339 TEST_F(SignedSettingsTest, RetrievePropertyFailed) { | 339 TEST_F(SignedSettingsTest, RetrievePropertyFailed) { |
| 340 FailingRetrievePropertyOp(OwnerManager::OPERATION_FAILED); | 340 FailingRetrievePropertyOp(OwnerManager::OPERATION_FAILED); |
| 341 } | 341 } |
| 342 | 342 |
| 343 } // namespace chromeos | 343 } // namespace chromeos |
| OLD | NEW |