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

Side by Side Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: git rebase-update patch Created 4 years, 2 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/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h" 5 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/json/json_writer.h" 15 #include "base/json/json_writer.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf igurator.h" 19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf igurator.h"
20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _creator.h" 20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _creator.h"
21 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s_test_utils.h" 21 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s_test_utils.h"
22 #include "net/base/host_port_pair.h" 22 #include "net/base/host_port_pair.h"
23 #include "net/base/net_errors.h" 23 #include "net/base/net_errors.h"
24 #include "net/http/http_status_code.h" 24 #include "net/http/http_status_code.h"
25 #include "net/log/net_log.h" 25 #include "net/log/net_log.h"
26 #include "net/log/net_log_event_type.h" 26 #include "net/log/net_log_event_type.h"
27 #include "net/log/net_log_source_type.h" 27 #include "net/log/net_log_source_type.h"
28 #include "net/log/net_log_with_source.h"
28 #include "net/log/test_net_log.h" 29 #include "net/log/test_net_log.h"
29 #include "net/log/test_net_log_entry.h" 30 #include "net/log/test_net_log_entry.h"
30 #include "net/proxy/proxy_server.h" 31 #include "net/proxy/proxy_server.h"
31 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
32 33
33 namespace data_reduction_proxy { 34 namespace data_reduction_proxy {
34 35
35 class DataReductionProxyEventStoreTest : public testing::Test { 36 class DataReductionProxyEventStoreTest : public testing::Test {
36 public: 37 public:
37 DataReductionProxyEventStoreTest() : net_log_(new net::TestNetLog()) { 38 DataReductionProxyEventStoreTest() : net_log_(new net::TestNetLog()) {
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 sanitized_event->SetString("method", "GET"); 293 sanitized_event->SetString("method", "GET");
293 294
294 bypass_event->Set("params", std::move(bypass_params)); 295 bypass_event->Set("params", std::move(bypass_params));
295 std::string sanitized_output; 296 std::string sanitized_output;
296 base::JSONWriter::Write(*sanitized_event.get(), &sanitized_output); 297 base::JSONWriter::Write(*sanitized_event.get(), &sanitized_output);
297 event_store()->AddAndSetLastBypassEvent(std::move(bypass_event), 0); 298 event_store()->AddAndSetLastBypassEvent(std::move(bypass_event), 0);
298 EXPECT_EQ(sanitized_output, event_store()->SanitizedLastBypassEvent()); 299 EXPECT_EQ(sanitized_output, event_store()->SanitizedLastBypassEvent());
299 } 300 }
300 301
301 } // namespace data_reduction_proxy 302 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698