Commit 43bbdec5 authored by Meredith Lane's avatar Meredith Lane Committed by Commit Bot

Revert "[Watch flakes]: Fix flakes from NetworkService."

This reverts commit 0068fa1b.

Reason for revert: CookieManagerImplTest.ReconnectToNetworkContext has been failing flakily: https://ci.chromium.org/p/chromium/builders/ci/Fuchsia%20x64

Original change's description:
> [Watch flakes]: Fix flakes from NetworkService.
> 
> This CL cause NetworkService::CreateForTesting to
> use a mock NetworkChangeNotifier which does not observe network changes
> 
> Bug: 1011275
> Change-Id: I6de34b7a5f6c5af5128cfc000ed63481f3351325
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864359
> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
> Reviewed-by: Eric Orth <ericorth@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#709257}

TBR=etiennep@chromium.org,ericorth@chromium.org

Change-Id: I2ae778c2f1d8f28cba45c4e8fd24b1597ea1a504
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011275
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880246Reviewed-by: default avatarMeredith Lane <meredithl@chromium.org>
Commit-Queue: Meredith Lane <meredithl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709370}
parent cda6d5ec
...@@ -329,12 +329,8 @@ std::unique_ptr<NetworkService> NetworkService::Create( ...@@ -329,12 +329,8 @@ std::unique_ptr<NetworkService> NetworkService::Create(
} }
std::unique_ptr<NetworkService> NetworkService::CreateForTesting() { std::unique_ptr<NetworkService> NetworkService::CreateForTesting() {
auto network_service = std::make_unique<NetworkService>( return std::make_unique<NetworkService>(
std::make_unique<service_manager::BinderRegistry>(), mojo::NullReceiver(), std::make_unique<service_manager::BinderRegistry>());
true /* delay_initialization_until_set_client */);
network_service->Initialize(mojom::NetworkServiceParams::New(),
true /* mock_network_change_notifier */);
return network_service;
} }
void NetworkService::RegisterNetworkContext(NetworkContext* network_context) { void NetworkService::RegisterNetworkContext(NetworkContext* network_context) {
......
...@@ -86,9 +86,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService ...@@ -86,9 +86,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService
static std::unique_ptr<NetworkService> Create( static std::unique_ptr<NetworkService> Create(
mojo::PendingReceiver<mojom::NetworkService> receiver); mojo::PendingReceiver<mojom::NetworkService> receiver);
// Creates a testing instance of NetworkService not bound to an actual Service // Creates a testing instance of NetworkService not bound to an actual
// pipe. This will cause NetworkChangeNotifier, unless already created, to be // Service pipe. This instance must be driven by direct calls onto the
// mocked. This instance must be driven by direct calls onto the
// NetworkService object. // NetworkService object.
static std::unique_ptr<NetworkService> CreateForTesting(); static std::unique_ptr<NetworkService> CreateForTesting();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment