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

Unified Diff: ui/views/test/scoped_views_test_helper.cc

Issue 2611773002: Removes code using mus client lib (Closed)
Patch Set: dont run on linux Created 3 years, 12 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 | « ui/views/test/platform_test_helper.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « ui/views/test/platform_test_helper.cc ('k') | ui/views/test/views_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698