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

Side by Side Diff: components/gcm_driver/gcm_stats_recorder_impl_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 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/gcm_driver/gcm_stats_recorder_impl.h" 5 #include "components/gcm_driver/gcm_stats_recorder_impl.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 static const char kNotifySendStatusEvent[] = "SEND status: QUEUED"; 93 static const char kNotifySendStatusEvent[] = "SEND status: QUEUED";
94 static const char kNotifySendStatusDetails[] = "Msg size: 99 bytes, TTL: 7"; 94 static const char kNotifySendStatusDetails[] = "Msg size: 99 bytes, TTL: 7";
95 static const char kIncomingSendErrorEvent[] = "Received 'send error' msg"; 95 static const char kIncomingSendErrorEvent[] = "Received 'send error' msg";
96 static const char kIncomingSendErrorDetails[] = ""; 96 static const char kIncomingSendErrorDetails[] = "";
97 97
98 } // namespace 98 } // namespace
99 99
100 class GCMStatsRecorderImplTest : public testing::Test { 100 class GCMStatsRecorderImplTest : public testing::Test {
101 public: 101 public:
102 GCMStatsRecorderImplTest(); 102 GCMStatsRecorderImplTest();
103 virtual ~GCMStatsRecorderImplTest(); 103 ~GCMStatsRecorderImplTest() override;
104 virtual void SetUp() override; 104 void SetUp() override;
105 105
106 void VerifyRecordedCheckinCount(int expected_count) { 106 void VerifyRecordedCheckinCount(int expected_count) {
107 EXPECT_EQ(expected_count, 107 EXPECT_EQ(expected_count,
108 static_cast<int>(recorder_.checkin_activities().size())); 108 static_cast<int>(recorder_.checkin_activities().size()));
109 } 109 }
110 void VerifyRecordedConnectionCount(int expected_count) { 110 void VerifyRecordedConnectionCount(int expected_count) {
111 EXPECT_EQ(expected_count, 111 EXPECT_EQ(expected_count,
112 static_cast<int>(recorder_.connection_activities().size())); 112 static_cast<int>(recorder_.connection_activities().size()));
113 } 113 }
114 void VerifyRecordedRegistrationCount(int expected_count) { 114 void VerifyRecordedRegistrationCount(int expected_count) {
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 recorder_.RecordIncomingSendError(kAppId, kReceiverId, kMessageId); 516 recorder_.RecordIncomingSendError(kAppId, kReceiverId, kMessageId);
517 VerifyRecordedSendingCount(3); 517 VerifyRecordedSendingCount(3);
518 VerifyIncomingSendError("3rd call"); 518 VerifyIncomingSendError("3rd call");
519 519
520 recorder_.RecordDataSentToWire(kAppId, kReceiverId, kMessageId, kQueuedSec); 520 recorder_.RecordDataSentToWire(kAppId, kReceiverId, kMessageId, kQueuedSec);
521 VerifyRecordedSendingCount(4); 521 VerifyRecordedSendingCount(4);
522 VerifyDataSentToWire("4th call"); 522 VerifyDataSentToWire("4th call");
523 } 523 }
524 524
525 } // namespace gcm 525 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop_unittest.cc ('k') | components/google/core/browser/google_url_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698