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

Side by Side Diff: components/proximity_auth/wire_message_unittest.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more 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 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 "components/proximity_auth/wire_message.h" 5 #include "components/proximity_auth/wire_message.h"
6 6
7 #include <stdint.h>
8
7 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 11
10 namespace proximity_auth { 12 namespace proximity_auth {
11 13
12 TEST(ProximityAuthWireMessage, Deserialize_EmptyMessage) { 14 TEST(ProximityAuthWireMessage, Deserialize_EmptyMessage) {
13 bool is_incomplete; 15 bool is_incomplete;
14 scoped_ptr<WireMessage> message = 16 scoped_ptr<WireMessage> message =
15 WireMessage::Deserialize(std::string(), &is_incomplete); 17 WireMessage::Deserialize(std::string(), &is_incomplete);
16 EXPECT_TRUE(is_incomplete); 18 EXPECT_TRUE(is_incomplete);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 EXPECT_EQ("example payload", message2->payload()); 229 EXPECT_EQ("example payload", message2->payload());
228 } 230 }
229 231
230 TEST(ProximityAuthWireMessage, Serialize_FailsWithoutPayload) { 232 TEST(ProximityAuthWireMessage, Serialize_FailsWithoutPayload) {
231 WireMessage message1(std::string(), "example id"); 233 WireMessage message1(std::string(), "example id");
232 std::string bytes = message1.Serialize(); 234 std::string bytes = message1.Serialize();
233 EXPECT_TRUE(bytes.empty()); 235 EXPECT_TRUE(bytes.empty());
234 } 236 }
235 237
236 } // namespace proximity_auth 238 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « components/proximity_auth/wire_message.cc ('k') | components/proxy_config/pref_proxy_config_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698