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

Unified Diff: components/ssl_errors/error_classification_unittest.cc

Issue 2447183002: Refactor network_time_test_utils (Closed)
Patch Set: another BUILD.gn fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/network_time/network_time_tracker_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ssl_errors/error_classification_unittest.cc
diff --git a/components/ssl_errors/error_classification_unittest.cc b/components/ssl_errors/error_classification_unittest.cc
index e436f4e3777597f0b27c5bae5a2a0bfbbb060ade..9e203a965a72d679c50572920cfdc008c0854178 100644
--- a/components/ssl_errors/error_classification_unittest.cc
+++ b/components/ssl_errors/error_classification_unittest.cc
@@ -39,9 +39,16 @@ NetworkErrorResponseHandler(const net::test_server::HttpRequest& request) {
} // namespace
-class SSLErrorClassificationTest : public network_time::FieldTrialTest {
+class SSLErrorClassificationTest : public ::testing::Test {
public:
- SSLErrorClassificationTest() : network_time::FieldTrialTest() {}
+ SSLErrorClassificationTest()
+ : field_trial_test_(new network_time::FieldTrialTest()) {}
+ network_time::FieldTrialTest* field_trial_test() {
+ return field_trial_test_.get();
+ }
+
+ private:
+ std::unique_ptr<network_time::FieldTrialTest> field_trial_test_;
};
TEST_F(SSLErrorClassificationTest, TestNameMismatch) {
@@ -349,7 +356,8 @@ TEST_F(SSLErrorClassificationTest, NetworkClockStateHistogram) {
std::unique_ptr<base::TickClock>(tick_clock), &pref_service,
new net::TestURLRequestContextGetter(io_thread.task_runner()));
network_time_tracker.SetTimeServerURLForTesting(test_server.GetURL("/"));
- SetNetworkQueriesWithVariationsService(true, 0.0);
+ field_trial_test()->SetNetworkQueriesWithVariationsService(
+ true, 0.0, network_time::FieldTrialTest::ENABLE_FETCHES_ON_DEMAND);
// No sync attempt.
EXPECT_EQ(
« no previous file with comments | « components/network_time/network_time_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698