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

Side by Side Diff: chrome/browser/chromeos/settings/session_manager_operation_unittest.cc

Issue 1547093002: Switch to standard integer types in chrome/browser/chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/settings/session_manager_operation.h" 5 #include "chrome/browser/chromeos/settings/session_manager_operation.h"
6 6
7 #include <stdint.h>
8
7 #include <string> 9 #include <string>
8 #include <vector> 10 #include <vector>
9 11
10 #include "base/basictypes.h"
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
16 #include "base/time/time.h" 18 #include "base/time/time.h"
17 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" 19 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
18 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" 20 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
19 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact ory.h" 21 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact ory.h"
20 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" 22 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
21 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" 23 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h"
22 #include "chrome/test/base/testing_profile.h" 24 #include "chrome/test/base/testing_profile.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 EXPECT_TRUE(validator->success()); 72 EXPECT_TRUE(validator->success());
71 EXPECT_TRUE(validator->payload().get()); 73 EXPECT_TRUE(validator->payload().get());
72 EXPECT_EQ(validator->payload()->SerializeAsString(), 74 EXPECT_EQ(validator->payload()->SerializeAsString(),
73 policy_.payload().SerializeAsString()); 75 policy_.payload().SerializeAsString());
74 validated_ = true; 76 validated_ = true;
75 } 77 }
76 78
77 void CheckPublicKeyLoaded(SessionManagerOperation* op) { 79 void CheckPublicKeyLoaded(SessionManagerOperation* op) {
78 ASSERT_TRUE(op->public_key().get()); 80 ASSERT_TRUE(op->public_key().get());
79 ASSERT_TRUE(op->public_key()->is_loaded()); 81 ASSERT_TRUE(op->public_key()->is_loaded());
80 std::vector<uint8> public_key; 82 std::vector<uint8_t> public_key;
81 ASSERT_TRUE(policy_.GetSigningKey()->ExportPublicKey(&public_key)); 83 ASSERT_TRUE(policy_.GetSigningKey()->ExportPublicKey(&public_key));
82 EXPECT_EQ(public_key, op->public_key()->data()); 84 EXPECT_EQ(public_key, op->public_key()->data());
83 } 85 }
84 86
85 protected: 87 protected:
86 base::MessageLoop message_loop_; 88 base::MessageLoop message_loop_;
87 content::TestBrowserThread ui_thread_; 89 content::TestBrowserThread ui_thread_;
88 content::TestBrowserThread file_thread_; 90 content::TestBrowserThread file_thread_;
89 91
90 policy::DevicePolicyBuilder policy_; 92 policy::DevicePolicyBuilder policy_;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 policy_.GetBlob()); 220 policy_.GetBlob());
219 ASSERT_TRUE(op.policy_data().get()); 221 ASSERT_TRUE(op.policy_data().get());
220 EXPECT_EQ(policy_.policy_data().SerializeAsString(), 222 EXPECT_EQ(policy_.policy_data().SerializeAsString(),
221 op.policy_data()->SerializeAsString()); 223 op.policy_data()->SerializeAsString());
222 ASSERT_TRUE(op.device_settings().get()); 224 ASSERT_TRUE(op.device_settings().get());
223 EXPECT_EQ(policy_.payload().SerializeAsString(), 225 EXPECT_EQ(policy_.payload().SerializeAsString(),
224 op.device_settings()->SerializeAsString()); 226 op.device_settings()->SerializeAsString());
225 } 227 }
226 228
227 } // namespace chromeos 229 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698