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

Side by Side Diff: blimp/net/blimp_connection_statistics_unittest.cc

Issue 1962393004: Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added empty implementation for linux client Created 4 years, 7 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
« no previous file with comments | « blimp/net/blimp_connection_statistics.cc ('k') | blimp/net/ssl_client_transport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/macros.h"
6 #include "blimp/net/blimp_connection_statistics.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace blimp {
10
11 class BlimpConnectionStatisticsTest : public testing::Test {
12 public:
13 BlimpConnectionStatisticsTest() {}
14
15 ~BlimpConnectionStatisticsTest() override {}
16
17 protected:
18 BlimpConnectionStatistics stats_;
19
20 private:
21 DISALLOW_COPY_AND_ASSIGN(BlimpConnectionStatisticsTest);
22 };
23
24 TEST_F(BlimpConnectionStatisticsTest, AddStatsAndVerify) {
25 DCHECK_EQ(0, stats_.Get(BlimpConnectionStatistics::BYTES_SENT));
26 DCHECK_EQ(0, stats_.Get(BlimpConnectionStatistics::BYTES_RECEIVED));
27 DCHECK_EQ(0, stats_.Get(BlimpConnectionStatistics::COMMIT));
28
29 stats_.Add(BlimpConnectionStatistics::BYTES_SENT, 10);
30 stats_.Add(BlimpConnectionStatistics::BYTES_SENT, 20);
31 stats_.Add(BlimpConnectionStatistics::BYTES_RECEIVED, 5);
32 stats_.Add(BlimpConnectionStatistics::COMMIT, 1);
33
34 DCHECK_EQ(30, stats_.Get(BlimpConnectionStatistics::BYTES_SENT));
35 DCHECK_EQ(5, stats_.Get(BlimpConnectionStatistics::BYTES_RECEIVED));
36 DCHECK_EQ(1, stats_.Get(BlimpConnectionStatistics::COMMIT));
37 }
38
39 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/net/blimp_connection_statistics.cc ('k') | blimp/net/ssl_client_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698