Chromium Code Reviews| Index: ash/test/ash_test_helper.cc |
| diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc |
| index 3bb992532e8b1eaac858758205ec15cdaf2f19c3..3f0c42723ba4399612c44e489c4d230ccea194a6 100644 |
| --- a/ash/test/ash_test_helper.cc |
| +++ b/ash/test/ash_test_helper.cc |
| @@ -27,6 +27,7 @@ |
| #include "base/test/sequenced_worker_pool_owner.h" |
| #include "chromeos/audio/cras_audio_handler.h" |
| #include "chromeos/dbus/dbus_thread_manager.h" |
| +#include "chromeos/network/network_handler.h" |
| #include "device/bluetooth/bluetooth_adapter_factory.h" |
| #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| #include "ui/aura/env.h" |
| @@ -300,12 +301,21 @@ void AshTestHelper::CreateMashWindowManager() { |
| window_tree_client_setup_.OwnWindowTreeClient(), |
| ash_test_environment_->GetBlockingPool()); |
| + // WindowManagerApplication starts the NetworkHandler. The NetworkHandler may |
| + // cause subtle side effects (such as additional tray items) and tests expect |
| + // it not to be running, so shut it down. |
| + chromeos::NetworkHandler::Shutdown(); |
|
James Cook
2017/03/22 22:27:22
Rather than doing this, how about passing a "for_t
|
| + |
| aura::WindowTreeClient* window_tree_client = |
| window_manager_app_->window_manager()->window_tree_client(); |
| window_tree_client_private_ = |
| base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client); |
| int next_x = 0; |
| CreateRootWindowController("800x600", &next_x); |
| + |
| + // Make sure the NetworkHandler didn't get turned on, see above comment as to |
| + // why the NetworkHandler should not be running. |
| + CHECK(!chromeos::NetworkHandler::IsInitialized()); |
| } |
| void AshTestHelper::CreateShell() { |