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

Side by Side Diff: chrome/browser/net/probe_message_unittest.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string.h> 5 #include <string.h>
6 6
7 #include "chrome/browser/net/probe_message.h" 7 #include "chrome/browser/net/probe_message.h"
8 #include "chrome/browser/net/probe_message.pb.h" 8 #include "chrome/browser/net/probe_message.pb.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace chrome_browser_net { 11 namespace chrome_browser_net {
12 12
13 class ProbeMessageTest : public ::testing::Test { 13 class ProbeMessageTest : public ::testing::Test {
14 protected: 14 protected:
15 ProbeMessageTest() {} 15 ProbeMessageTest() {}
16 16
17 virtual ~ProbeMessageTest() {} 17 ~ProbeMessageTest() override {}
18 }; 18 };
19 19
20 TEST_F(ProbeMessageTest, TestGenerateProbeRequest) { 20 TEST_F(ProbeMessageTest, TestGenerateProbeRequest) {
21 ProbeMessage pm; 21 ProbeMessage pm;
22 ProbePacket_Token token; 22 ProbePacket_Token token;
23 token.set_timestamp_micros(1000000U); 23 token.set_timestamp_micros(1000000U);
24 token.mutable_hash()->assign("1x1x"); 24 token.mutable_hash()->assign("1x1x");
25 uint32 group_id = 1; 25 uint32 group_id = 1;
26 uint32 probe_size = 500; 26 uint32 probe_size = 500;
27 uint32 pacing_interval_micros = 1000000; 27 uint32 pacing_interval_micros = 1000000;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 expected_str[i] = original[i] ^ ProbeMessage::kEncodingString[i]; 97 expected_str[i] = original[i] ^ ProbeMessage::kEncodingString[i];
98 } 98 }
99 EXPECT_EQ(output, expected_str); 99 EXPECT_EQ(output, expected_str);
100 100
101 // Do it again to decode. 101 // Do it again to decode.
102 std::string twice_encoded = pm.Encode(output); 102 std::string twice_encoded = pm.Encode(output);
103 EXPECT_EQ(twice_encoded, original); 103 EXPECT_EQ(twice_encoded, original);
104 } 104 }
105 105
106 } // namespace chrome_browser_net 106 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698