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

Unified Diff: components/network_time/network_time_test_utils.h

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/BUILD.gn ('k') | components/network_time/network_time_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/network_time/network_time_test_utils.h
diff --git a/components/network_time/network_time_test_utils.h b/components/network_time/network_time_test_utils.h
index 09dee4c7e05c958273d0da005f78088e57fe527c..97ed8dce53509e93ea1fda438cc1f54103447b83 100644
--- a/components/network_time/network_time_test_utils.h
+++ b/components/network_time/network_time_test_utils.h
@@ -9,7 +9,6 @@
#include <memory>
#include "base/macros.h"
-#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace test {
@@ -19,16 +18,32 @@ class ScopedFeatureList;
class FieldTrialList;
} // namespace base
+namespace net {
+namespace test_server {
+struct HttpRequest;
+class HttpResponse;
+} // namespace test_server
+} // namespace net
+
namespace network_time {
-// A test fixture that allows configuring the network time queries field trial.
-class FieldTrialTest : public ::testing::Test {
+
+std::unique_ptr<net::test_server::HttpResponse> GoodTimeResponseHandler(
+ const net::test_server::HttpRequest& request);
+
+// Allows tests to configure the network time queries field trial.
+class FieldTrialTest {
public:
- FieldTrialTest();
- ~FieldTrialTest() override;
+ enum FetchesOnDemandStatus {
+ ENABLE_FETCHES_ON_DEMAND,
+ DISABLE_FETCHES_ON_DEMAND,
+ };
- protected:
- void SetNetworkQueriesWithVariationsService(bool enable,
- float query_probability);
+ FieldTrialTest();
+ virtual ~FieldTrialTest();
+ void SetNetworkQueriesWithVariationsService(
+ bool enable,
+ float query_probability,
+ FetchesOnDemandStatus fetches_on_demand);
private:
std::unique_ptr<base::FieldTrialList> field_trial_list_;
« no previous file with comments | « components/network_time/BUILD.gn ('k') | components/network_time/network_time_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698