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

Unified Diff: ui/ozone/platform/test/ozone_platform_test.cc

Issue 1024583003: Fix for menus blocking user activity detection (Retry 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/base/user_activity/user_activity_detector_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/test/ozone_platform_test.cc
diff --git a/ui/ozone/platform/test/ozone_platform_test.cc b/ui/ozone/platform/test/ozone_platform_test.cc
index fce3a9d3cd3fa4382abd9dfa36ece6b2726fb827..d94fde97707f0cdd31e5db7ac966355656f59a52 100644
--- a/ui/ozone/platform/test/ozone_platform_test.cc
+++ b/ui/ozone/platform/test/ozone_platform_test.cc
@@ -25,6 +25,17 @@ namespace ui {
namespace {
+// A test implementation of PlatformEventSource that we can instantiate to make
+// sure that the PlatformEventSource has an instance while in unit tests.
+class TestPlatformEventSource : public ui::PlatformEventSource {
+ public:
+ TestPlatformEventSource() {}
+ ~TestPlatformEventSource() override {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestPlatformEventSource);
+};
+
// OzonePlatform for testing
//
// This platform dumps images to a file for testing purposes.
@@ -67,7 +78,7 @@ class OzonePlatformTest : public OzonePlatform {
window_manager_->Initialize();
// This unbreaks tests that create their own.
if (!PlatformEventSource::GetInstance())
- platform_event_source_ = PlatformEventSource::CreateDefault();
+ platform_event_source_.reset(new TestPlatformEventSource);
KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
make_scoped_ptr(new StubKeyboardLayoutEngine()));
« no previous file with comments | « ui/base/user_activity/user_activity_detector_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698