Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Side by Side Diff: chrome/browser/chromeos/login/signed_settings_helper_unittest.cc

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_helper.h" 5 #include "chrome/browser/chromeos/login/signed_settings_helper.h"
6 6
7 #include "chrome/browser/chromeos/cros/cros_library.h" 7 #include "chrome/browser/chromeos/cros/cros_library.h"
8 #include "chrome/browser/chromeos/cros_settings_names.h" 8 #include "chrome/browser/chromeos/cros_settings_names.h"
9 #include "chrome/browser/chromeos/login/mock_ownership_service.h" 9 #include "chrome/browser/chromeos/login/mock_ownership_service.h"
10 #include "chrome/browser/chromeos/login/owner_manager.h" 10 #include "chrome/browser/chromeos/login/owner_manager.h"
11 #include "chrome/browser/chromeos/login/signed_settings.h" 11 #include "chrome/browser/chromeos/login/signed_settings.h"
12 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" 12 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h"
13 #include "chrome/browser/policy/proto/device_management_backend.pb.h" 13 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
14 #include "chrome/test/base/testing_browser_process_test.h"
15 #include "content/browser/browser_thread.h" 14 #include "content/browser/browser_thread.h"
16 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
18 17
19 using ::testing::_; 18 using ::testing::_;
20 using ::testing::A; 19 using ::testing::A;
21 using ::testing::AtLeast; 20 using ::testing::AtLeast;
22 using ::testing::InSequence; 21 using ::testing::InSequence;
23 using ::testing::Invoke; 22 using ::testing::Invoke;
24 using ::testing::Return; 23 using ::testing::Return;
(...skipping 15 matching lines...) Expand all
40 MOCK_METHOD3(OnStorePropertyCompleted, void( 39 MOCK_METHOD3(OnStorePropertyCompleted, void(
41 SignedSettings::ReturnCode code, 40 SignedSettings::ReturnCode code,
42 const std::string& name, 41 const std::string& name,
43 const std::string& value)); 42 const std::string& value));
44 MOCK_METHOD3(OnRetrievePropertyCompleted, void( 43 MOCK_METHOD3(OnRetrievePropertyCompleted, void(
45 SignedSettings::ReturnCode code, 44 SignedSettings::ReturnCode code,
46 const std::string& name, 45 const std::string& name,
47 const std::string& value)); 46 const std::string& value));
48 }; 47 };
49 48
50 class SignedSettingsHelperTest : public TestingBrowserProcessTest, 49 class SignedSettingsHelperTest : public testing::Test,
51 public SignedSettingsHelper::TestDelegate { 50 public SignedSettingsHelper::TestDelegate {
52 public: 51 public:
53 SignedSettingsHelperTest() 52 SignedSettingsHelperTest()
54 : fake_email_("fakey@example.com"), 53 : fake_email_("fakey@example.com"),
55 fake_prop_(kAccountsPrefAllowGuest), 54 fake_prop_(kAccountsPrefAllowGuest),
56 fake_value_("false"), 55 fake_value_("false"),
57 message_loop_(MessageLoop::TYPE_UI), 56 message_loop_(MessageLoop::TYPE_UI),
58 ui_thread_(BrowserThread::UI, &message_loop_), 57 ui_thread_(BrowserThread::UI, &message_loop_),
59 file_thread_(BrowserThread::FILE), 58 file_thread_(BrowserThread::FILE),
60 pending_ops_(0) { 59 pending_ops_(0) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 SignedSettingsHelper::Get()->CancelCallback(&cb_to_be_canceled); 212 SignedSettingsHelper::Get()->CancelCallback(&cb_to_be_canceled);
214 213
215 SignedSettingsHelper::Get()->StartStorePropertyOp(fake_prop_, fake_value_, 214 SignedSettingsHelper::Get()->StartStorePropertyOp(fake_prop_, fake_value_,
216 &cb); 215 &cb);
217 SignedSettingsHelper::Get()->StartRetrieveProperty(fake_prop_, &cb); 216 SignedSettingsHelper::Get()->StartRetrieveProperty(fake_prop_, &cb);
218 217
219 message_loop_.Run(); 218 message_loop_.Run();
220 } 219 }
221 220
222 } // namespace chromeos 221 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698