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

Side by Side Diff: remoting/client/client_telemetry_logger_unittest.cc

Issue 1972793002: TelemetryLogWriter cleanups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback 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 | « remoting/client/client_telemetry_logger.cc ('k') | remoting/remoting_srcs.gypi » ('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 2016 The Chromium Authors. All rights reserved. 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 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 "remoting/client/client_telemetry_logger.h" 5 #include "remoting/client/client_telemetry_logger.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/message_loop/message_loop.h"
12 #include "base/threading/thread_task_runner_handle.h"
13 #include "remoting/protocol/connection_to_host.h" 11 #include "remoting/protocol/connection_to_host.h"
14 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
15 13
16 namespace { 14 namespace {
17 15
18 // Returns true if |actual| has all fields that |expected| has and the values 16 // Returns true if |actual| has all fields that |expected| has and the values
19 // also match. |actual| can have fields that |expected| doesn't have but not the 17 // also match. |actual| can have fields that |expected| doesn't have but not the
20 // other way around. 18 // other way around.
21 static bool Contains(const remoting::ChromotingEvent& actual, 19 static bool Contains(const remoting::ChromotingEvent& actual,
22 const remoting::ChromotingEvent& expected) { 20 const remoting::ChromotingEvent& expected) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 TEST_F(ClientTelemetryLoggerTest, PassesThroughAuthTokenAndClosure) { 177 TEST_F(ClientTelemetryLoggerTest, PassesThroughAuthTokenAndClosure) {
180 std::string token("some token"); 178 std::string token("some token");
181 base::Closure closure = base::Bind(&base::DoNothing); 179 base::Closure closure = base::Bind(&base::DoNothing);
182 logger_->SetAuthToken(token); 180 logger_->SetAuthToken(token);
183 logger_->SetAuthClosure(closure); 181 logger_->SetAuthClosure(closure);
184 EXPECT_EQ(token, log_writer_->auth_token()); 182 EXPECT_EQ(token, log_writer_->auth_token());
185 EXPECT_TRUE(closure.Equals(log_writer_->auth_closure())); 183 EXPECT_TRUE(closure.Equals(log_writer_->auth_closure()));
186 } 184 }
187 185
188 } // namespace remoting 186 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/client_telemetry_logger.cc ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698