Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc |
index 3d9e073a4e2d61d1788300b4c70ad29b74280cf7..58fd26b36ec1dd9c864d96145be1f19bbb7e272c 100644 |
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc |
@@ -1545,6 +1545,7 @@ TEST_F(DataReductionProxyConfigTest, ShouldAcceptServerPreview) { |
scoped_feature_list.InitAndEnableFeature( |
features::kDataReductionProxyDecidesTransform); |
+ base::HistogramTester histogram_tester; |
net::TestURLRequestContext context_; |
net::TestDelegate delegate_; |
std::unique_ptr<net::URLRequest> request = context_.CreateRequest( |
@@ -1565,6 +1566,9 @@ TEST_F(DataReductionProxyConfigTest, ShouldAcceptServerPreview) { |
switches::kDataReductionProxyLoFiValueDisabled); |
EXPECT_FALSE(config()->ShouldAcceptServerPreview(*request.get(), |
*previews_decider.get())); |
+ histogram_tester.ExpectBucketCount( |
+ "DataReductionProxy.Protocol.NotAcceptingTransform", |
+ 0 /* NOT_ACCEPTING_TRANSFORM_DISABLED */, 1); |
// Verify true for Slow Connection flag. |
base::CommandLine::ForCurrentProcess()->InitFromArgv(0, NULL); |
@@ -1583,6 +1587,9 @@ TEST_F(DataReductionProxyConfigTest, ShouldAcceptServerPreview) { |
net::NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI); |
EXPECT_FALSE(config()->ShouldAcceptServerPreview(*request.get(), |
*previews_decider.get())); |
+ histogram_tester.ExpectBucketCount( |
+ "DataReductionProxy.Protocol.NotAcceptingTransform", |
+ 2 /* NOT_ACCEPTING_TRANSFORM_DISABLED */, 1); |
// Verify true for Cellular Only flag and 3G connection. |
config()->SetConnectionTypeForTesting( |
@@ -1601,6 +1608,9 @@ TEST_F(DataReductionProxyConfigTest, ShouldAcceptServerPreview) { |
"DataReductionProxyPreviewsBlackListTransition", "Enabled"); |
EXPECT_FALSE(config()->ShouldAcceptServerPreview(*request.get(), |
*previews_decider.get())); |
+ histogram_tester.ExpectBucketCount( |
+ "DataReductionProxy.Protocol.NotAcceptingTransform", |
+ 1 /* NOT_ACCEPTING_TRANSFORM_BLACKLISTED */, 1); |
previews_decider = base::MakeUnique<TestPreviewsDecider>(true); |
EXPECT_TRUE(config()->ShouldAcceptServerPreview(*request.get(), |
*previews_decider.get())); |