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

Unified Diff: services/ui/ws/platform_display_default_unittest.cc

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Removing debug include. Created 3 years, 5 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 | « services/ui/ws/platform_display_default.cc ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/platform_display_default_unittest.cc
diff --git a/services/ui/ws/platform_display_default_unittest.cc b/services/ui/ws/platform_display_default_unittest.cc
index bc3b399c74196f663236d9ae376c27ca44ccd810..57c0fb738c43618f658d84ef09be1e8ac1c2a8df 100644
--- a/services/ui/ws/platform_display_default_unittest.cc
+++ b/services/ui/ws/platform_display_default_unittest.cc
@@ -5,8 +5,9 @@
#include "services/ui/ws/platform_display_default.h"
#include "base/time/time.h"
+#include "services/ui/common/image_cursors_set.h"
+#include "services/ui/ws/threaded_image_cursors.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/base/cursor/image_cursors.h"
#include "ui/display/types/native_display_delegate.h"
#include "ui/events/event.h"
#include "ui/events/event_sink.h"
@@ -104,6 +105,8 @@ class TestOzonePlatform : public OzonePlatform {
// locally and on the trybots on 06/13/2017, while passing when run on the CQ
// and the builders. crbug.com/732987
TEST(PlatformDisplayDefaultTest, DISABLED_EventDispatch) {
+ // ThreadTaskRunnerHandle needed required by ThreadedImageCursors.
+ base::MessageLoop loop;
// Setup ozone so the display can be initialized.
TestOzonePlatform platform;
@@ -112,8 +115,14 @@ TEST(PlatformDisplayDefaultTest, DISABLED_EventDispatch) {
metrics.bounds_in_pixels = gfx::Rect(1024, 768);
metrics.device_scale_factor = 1.f;
metrics.ui_scale_factor = 1.f;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner =
+ base::ThreadTaskRunnerHandle::Get();
+ ImageCursorsSet image_cursors_set;
+ std::unique_ptr<ThreadedImageCursors> threaded_image_cursors =
+ base::MakeUnique<ThreadedImageCursors>(task_runner,
+ image_cursors_set.GetWeakPtr());
PlatformDisplayDefault display(nullptr, metrics,
- std::unique_ptr<ImageCursors>());
+ std::move(threaded_image_cursors));
// Initialize the display with a test EventSink so we can sense events.
TestEventSink event_sink;
« no previous file with comments | « services/ui/ws/platform_display_default.cc ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698