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

Side by Side Diff: chromeos/cryptohome/homedir_methods_unittest.cc

Issue 1540803002: Switch to standard integer types in chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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
« no previous file with comments | « chromeos/cryptohome/homedir_methods.cc ('k') | chromeos/cryptohome/mock_async_method_caller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromeos/cryptohome/homedir_methods.h" 5 #include "chromeos/cryptohome/homedir_methods.h"
6 6
7 #include <stdint.h>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
11 #include "chromeos/dbus/cryptohome/rpc.pb.h" 14 #include "chromeos/dbus/cryptohome/rpc.pb.h"
12 #include "chromeos/dbus/cryptohome_client.h" 15 #include "chromeos/dbus/cryptohome_client.h"
13 #include "chromeos/dbus/dbus_method_call_status.h" 16 #include "chromeos/dbus/dbus_method_call_status.h"
14 #include "chromeos/dbus/dbus_thread_manager.h" 17 #include "chromeos/dbus/dbus_thread_manager.h"
15 #include "chromeos/dbus/mock_cryptohome_client.h" 18 #include "chromeos/dbus/mock_cryptohome_client.h"
16 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
18 21
19 using testing::_; 22 using testing::_;
(...skipping 10 matching lines...) Expand all
30 std::string actual_value; 33 std::string actual_value;
31 arg.SerializeToString(&actual_value); 34 arg.SerializeToString(&actual_value);
32 return actual_value == expected_value; 35 return actual_value == expected_value;
33 } 36 }
34 37
35 } // namespace 38 } // namespace
36 39
37 const char kUserID[] = "user@example.com"; 40 const char kUserID[] = "user@example.com";
38 const char kKeyLabel[] = "key_label"; 41 const char kKeyLabel[] = "key_label";
39 42
40 const int64 kKeyRevision = 123; 43 const int64_t kKeyRevision = 123;
41 const char kProviderData1Name[] = "data_1"; 44 const char kProviderData1Name[] = "data_1";
42 const int64 kProviderData1Number = 12345; 45 const int64_t kProviderData1Number = 12345;
43 const char kProviderData2Name[] = "data_2"; 46 const char kProviderData2Name[] = "data_2";
44 const char kProviderData2Bytes[] = "data_2 bytes"; 47 const char kProviderData2Bytes[] = "data_2 bytes";
45 48
46 class HomedirMethodsTest : public testing::Test { 49 class HomedirMethodsTest : public testing::Test {
47 public: 50 public:
48 HomedirMethodsTest(); 51 HomedirMethodsTest();
49 ~HomedirMethodsTest() override; 52 ~HomedirMethodsTest() override;
50 53
51 // testing::Test: 54 // testing::Test:
52 void SetUp() override; 55 void SetUp() override;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 EXPECT_EQ(kProviderData1Number, *provider_data->number.get()); 179 EXPECT_EQ(kProviderData1Number, *provider_data->number.get());
177 EXPECT_FALSE(provider_data->bytes); 180 EXPECT_FALSE(provider_data->bytes);
178 provider_data = &key_definition.provider_data[1]; 181 provider_data = &key_definition.provider_data[1];
179 EXPECT_EQ(kProviderData2Name, provider_data->name); 182 EXPECT_EQ(kProviderData2Name, provider_data->name);
180 EXPECT_FALSE(provider_data->number); 183 EXPECT_FALSE(provider_data->number);
181 ASSERT_TRUE(provider_data->bytes); 184 ASSERT_TRUE(provider_data->bytes);
182 EXPECT_EQ(kProviderData2Bytes, *provider_data->bytes.get()); 185 EXPECT_EQ(kProviderData2Bytes, *provider_data->bytes.get());
183 } 186 }
184 187
185 } // namespace cryptohome 188 } // namespace cryptohome
OLDNEW
« no previous file with comments | « chromeos/cryptohome/homedir_methods.cc ('k') | chromeos/cryptohome/mock_async_method_caller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698