Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc |
| index d3f466b90268cc19b40556395b184b7ce803cb1b..1bf9e4d6e8fcbd49f8d5e2025511c72779fbf124 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate_unittest.cc |
| @@ -666,11 +666,11 @@ class DataReductionProxyDelegateTest : public testing::Test { |
| } |
| int64_t total_received_bytes() const { |
| - return GetSessionNetworkStatsInfoInt64("session_received_content_length"); |
| + return test_context_->io_data()->actual_content_length(); |
|
tbansal1
2016/12/20 23:20:48
Is it possible to get this from compression stats
RyanSturm
2016/12/21 00:10:20
Done.
|
| } |
| int64_t total_original_received_bytes() const { |
| - return GetSessionNetworkStatsInfoInt64("session_original_content_length"); |
| + return test_context_->io_data()->original_content_length(); |
| } |
| net::MockClientSocketFactory* mock_socket_factory() { |
| @@ -692,23 +692,6 @@ class DataReductionProxyDelegateTest : public testing::Test { |
| } |
| private: |
| - int64_t GetSessionNetworkStatsInfoInt64(const char* key) const { |
| - const DataReductionProxyNetworkDelegate* drp_network_delegate = |
| - reinterpret_cast<const DataReductionProxyNetworkDelegate*>( |
| - context_.network_delegate()); |
| - |
| - std::unique_ptr<base::DictionaryValue> session_network_stats_info = |
| - base::DictionaryValue::From( |
| - drp_network_delegate->SessionNetworkStatsInfoToValue()); |
| - EXPECT_TRUE(session_network_stats_info); |
| - |
| - std::string string_value; |
| - EXPECT_TRUE(session_network_stats_info->GetString(key, &string_value)); |
| - int64_t value = 0; |
| - EXPECT_TRUE(base::StringToInt64(string_value, &value)); |
| - return value; |
| - } |
| - |
| base::MessageLoopForIO message_loop_; |
| net::MockClientSocketFactory mock_socket_factory_; |
| net::TestURLRequestContext context_; |