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

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

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Undo Screen TLS change, don't use Screen::GetScreen() in Mus. Created 3 years, 6 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
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..25c2c102f6f20b95a2926eeb30173911a928c1f0 100644
--- a/services/ui/ws/platform_display_default_unittest.cc
+++ b/services/ui/ws/platform_display_default_unittest.cc
@@ -5,6 +5,7 @@
#include "services/ui/ws/platform_display_default.h"
#include "base/time/time.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"
@@ -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();
+ ImageCursors image_cursors;
+ std::unique_ptr<ThreadedImageCursors> threaded_image_cursors =
+ base::MakeUnique<ThreadedImageCursors>(task_runner,
+ image_cursors.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;

Powered by Google App Engine
This is Rietveld 408576698