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

Unified Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 2835503003: Replace SyncTest::SetUpInProcessBrowserTestFixture with SyncTest::SetUpOnMainThread. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index d3e6e4b4099746779b840d8a75260f5e39caa500..f2a9a28513d9aae5252f523a9de6429772dc13cd 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -82,6 +82,7 @@
#include "net/base/load_flags.h"
#include "net/base/network_change_notifier.h"
#include "net/base/port_util.h"
+#include "net/dns/mock_host_resolver.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_fetcher.h"
@@ -761,28 +762,18 @@ void SyncTest::TearDownOnMainThread() {
clients_.clear();
}
-void SyncTest::SetUpInProcessBrowserTestFixture() {
- // We don't take a reference to |resolver|, but mock_host_resolver_override_
- // does, so effectively assumes ownership.
- net::RuleBasedHostResolverProc* resolver =
- new net::RuleBasedHostResolverProc(host_resolver());
- resolver->AllowDirectLookup("*.google.com");
+void SyncTest::SetUpOnMainThread() {
+ host_resolver()->AllowDirectLookup("*.google.com");
// Allow connection to googleapis.com for oauth token requests in E2E tests.
- resolver->AllowDirectLookup("*.googleapis.com");
+ host_resolver()->AllowDirectLookup("*.googleapis.com");
// On Linux, we use Chromium's NSS implementation which uses the following
// hosts for certificate verification. Without these overrides, running the
// integration tests on Linux causes error as we make external DNS lookups.
- resolver->AllowDirectLookup("*.thawte.com");
- resolver->AllowDirectLookup("*.geotrust.com");
- resolver->AllowDirectLookup("*.gstatic.com");
- mock_host_resolver_override_ =
- base::MakeUnique<net::ScopedDefaultHostResolverProc>(resolver);
-}
-
-void SyncTest::TearDownInProcessBrowserTestFixture() {
- mock_host_resolver_override_.reset();
+ host_resolver()->AllowDirectLookup("*.thawte.com");
+ host_resolver()->AllowDirectLookup("*.geotrust.com");
+ host_resolver()->AllowDirectLookup("*.gstatic.com");
}
void SyncTest::WaitForDataModels(Profile* profile) {
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698