Index: ui/views/test/scoped_views_test_helper.cc |
diff --git a/ui/views/test/scoped_views_test_helper.cc b/ui/views/test/scoped_views_test_helper.cc |
index a67ca6e8cffa599f7b69f08296062cd77668e0d7..051f8e64bc21f92fd0b18fa1bc5071429b801411 100644 |
--- a/ui/views/test/scoped_views_test_helper.cc |
+++ b/ui/views/test/scoped_views_test_helper.cc |
@@ -16,10 +16,6 @@ |
#include "ui/views/test/test_views_delegate.h" |
#include "ui/views/test/views_test_helper.h" |
-#if defined(USE_AURA) |
-#include "ui/aura/env.h" |
-#endif |
- |
namespace views { |
ScopedViewsTestHelper::ScopedViewsTestHelper() |
@@ -31,16 +27,6 @@ ScopedViewsTestHelper::ScopedViewsTestHelper( |
platform_test_helper_(PlatformTestHelper::Create()) { |
// The ContextFactory must exist before any Compositors are created. |
bool enable_pixel_output = false; |
-#if defined(USE_AURA) |
- ui::ContextFactory* old_context_factory = nullptr; |
- ui::ContextFactoryPrivate* old_context_factory_private = nullptr; |
- if (PlatformTestHelper::IsMus()) { |
- old_context_factory = aura::Env::GetInstance()->context_factory(); |
- DCHECK(old_context_factory); |
- old_context_factory_private = |
- aura::Env::GetInstance()->context_factory_private(); |
- } |
-#endif |
ui::ContextFactory* context_factory = nullptr; |
ui::ContextFactoryPrivate* context_factory_private = nullptr; |
ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, |
@@ -55,21 +41,6 @@ ScopedViewsTestHelper::ScopedViewsTestHelper( |
platform_test_helper_->OnTestHelperCreated(test_helper_.get()); |
test_helper_->SetUp(); |
-#if defined(USE_AURA) |
- // When running inside mus, the context-factory from |
- // ui::InitializeContextFactoryForTests() is only needed for the default |
- // WindowTreeHost instance created by TestScreen. After that, the |
- // context-factory is used when creating Widgets (to set-up the compositor for |
- // the corresponding ui::Windows). So restore the context-factory (which |
- // WindowManagerConnection would have set up), so that NativeWidgetMus |
- // installs the correct context-factory that can talk to mus. |
- if (PlatformTestHelper::IsMus()) { |
- aura::Env::GetInstance()->set_context_factory(old_context_factory); |
- aura::Env::GetInstance()->set_context_factory_private( |
- old_context_factory_private); |
- } |
-#endif |
- |
ui::InitializeInputMethodForTesting(); |
ui::TestClipboard::CreateForCurrentThread(); |
} |