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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc

Issue 1084533002: Rename NetLogLogger and CapturingNetLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename NetLogLogger and CapturingNetLog(removed compiler error for chromeOS) Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
index a02d92ae82a88bff505840cc823f1a7b1d0e9505..6f266dd33f79f9f897b2d6ffd9dd0941400ae866 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
@@ -10,8 +10,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/test/test_simple_task_runner.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
-#include "net/log/capturing_net_log.h"
#include "net/log/net_log.h"
+#include "net/log/test_net_log.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace data_reduction_proxy {
@@ -20,8 +20,8 @@ class DataReductionProxyEventStoreTest : public testing::Test {
public:
DataReductionProxyEventStoreTest()
: task_runner_(scoped_refptr<base::TestSimpleTaskRunner>(
- new base::TestSimpleTaskRunner())),
- net_log_(new net::CapturingNetLog()) {
+ new base::TestSimpleTaskRunner())),
+ net_log_(new net::TestNetLog()) {
bound_net_log_ = net::BoundNetLog::Make(
net_log_.get(), net::NetLog::SOURCE_DATA_REDUCTION_PROXY);
}
@@ -30,8 +30,8 @@ class DataReductionProxyEventStoreTest : public testing::Test {
proxy_.reset(new DataReductionProxyEventStore(task_runner_));
}
- net::CapturingNetLog::CapturedEntry GetSingleEntry() const {
- net::CapturingNetLog::CapturedEntryList entries;
+ net::TestNetLog::CapturedEntry GetSingleEntry() const {
+ net::TestNetLog::CapturedEntryList entries;
net_log_->GetEntries(&entries);
EXPECT_EQ(1u, entries.size());
return entries[0];
@@ -45,9 +45,7 @@ class DataReductionProxyEventStoreTest : public testing::Test {
return task_runner_.get();
}
- net::CapturingNetLog* net_log() {
- return net_log_.get();
- }
+ net::TestNetLog* net_log() { return net_log_.get(); }
const net::BoundNetLog& bound_net_log() {
return bound_net_log_;
@@ -55,7 +53,7 @@ class DataReductionProxyEventStoreTest : public testing::Test {
private:
scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
- scoped_ptr<net::CapturingNetLog> net_log_;
+ scoped_ptr<net::TestNetLog> net_log_;
scoped_ptr<DataReductionProxyEventStore> proxy_;
net::BoundNetLog bound_net_log_;
};
@@ -69,7 +67,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddProxyEnabledEvent) {
TestDataReductionProxyParams::DefaultSSLOrigin());
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_ENABLED,
entry.type);
}
@@ -79,7 +77,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddProxyDisabledEvent) {
proxy()->AddProxyDisabledEvent(net_log());
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_ENABLED,
entry.type);
}
@@ -91,7 +89,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddBypassActionEvent) {
base::TimeDelta::FromMinutes(1));
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
entry.type);
EXPECT_NE(nullptr, proxy()->last_bypass_event_.get());
@@ -105,7 +103,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddBypassTypeEvent) {
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
entry.type);
EXPECT_NE(nullptr, proxy()->last_bypass_event_.get());
@@ -118,7 +116,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestBeginSecureProxyCheck) {
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_CANARY_REQUEST,
entry.type);
EXPECT_EQ(CHECK_PENDING, proxy()->secure_proxy_check_state_);
@@ -131,7 +129,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestEndSecureProxyCheck) {
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_CANARY_REQUEST,
entry.type);
EXPECT_EQ(CHECK_SUCCESS, proxy()->secure_proxy_check_state_);
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc ('k') | content/shell/browser/shell_net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698