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

Unified Diff: ui/views/mus/views_mus_test_suite.cc

Issue 2752303002: views/mus: Install a mus-friend ContextFactory for tests. (Closed)
Patch Set: . Created 3 years, 9 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/mus/BUILD.gn ('k') | ui/views/test/platform_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/views_mus_test_suite.cc
diff --git a/ui/views/mus/views_mus_test_suite.cc b/ui/views/mus/views_mus_test_suite.cc
index cf479177218cebe7e13b9d49b05600e5982d7ee6..4953ce5e605c773cfe902aec99c34a45573fc73c 100644
--- a/ui/views/mus/views_mus_test_suite.cc
+++ b/ui/views/mus/views_mus_test_suite.cc
@@ -27,6 +27,7 @@
#include "ui/aura/test/env_test_helper.h"
#include "ui/aura/test/mus/input_method_mus_test_api.h"
#include "ui/aura/window.h"
+#include "ui/compositor/test/fake_context_factory.h"
#include "ui/gl/gl_switches.h"
#include "ui/views/mus/desktop_window_tree_host_mus.h"
#include "ui/views/mus/mus_client.h"
@@ -91,6 +92,13 @@ class PlatformTestHelperMus : public PlatformTestHelper {
->OnEmbedRootDestroyed(window_tree_host);
}
+ void InitializeContextFactory(
+ ui::ContextFactory** context_factory,
+ ui::ContextFactoryPrivate** context_factory_private) override {
+ *context_factory = &context_factory_;
+ *context_factory_private = nullptr;
+ }
+
private:
NativeWidget* CreateNativeWidget(const Widget::InitParams& init_params,
internal::NativeWidgetDelegate* delegate) {
@@ -109,6 +117,7 @@ class PlatformTestHelperMus : public PlatformTestHelper {
}
std::unique_ptr<MusClient> mus_client_;
+ ui::FakeContextFactory context_factory_;
DISALLOW_COPY_AND_ASSIGN(PlatformTestHelperMus);
};
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | ui/views/test/platform_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698