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

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

Issue 2696963003: Split cursor location from UserDisplayManager. (Closed)
Patch Set: Fix nits. Created 3 years, 10 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/user_display_manager.cc ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/user_display_manager_unittest.cc
diff --git a/services/ui/ws/user_display_manager_unittest.cc b/services/ui/ws/user_display_manager_unittest.cc
index 174886fc348cc90a7596c11a6f5e112fd89fd8ca..2c01a3dbd3097d202b748aabde0e455644088537 100644
--- a/services/ui/ws/user_display_manager_unittest.cc
+++ b/services/ui/ws/user_display_manager_unittest.cc
@@ -8,7 +8,6 @@
#include <string>
-#include "base/atomicops.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
@@ -210,34 +209,6 @@ TEST_F(UserDisplayManagerTest, AddRemoveDisplay) {
display_manager_observer1.GetAndClearObserverCalls());
}
-TEST_F(UserDisplayManagerTest, NegativeCoordinates) {
- screen_manager().AddDisplay();
-
- TestDisplayManagerObserver display_manager_observer1;
- DisplayManager* display_manager = window_server()->display_manager();
- AddWindowManager(window_server(), kUserId1);
- UserDisplayManager* user_display_manager1 =
- display_manager->GetUserDisplayManager(kUserId1);
- ASSERT_TRUE(user_display_manager1);
-
- user_display_manager1->OnMouseCursorLocationChanged(gfx::Point(-10, -11));
-
- base::subtle::Atomic32* cursor_location_memory = nullptr;
- mojo::ScopedSharedBufferHandle handle =
- user_display_manager1->GetCursorLocationMemory();
- mojo::ScopedSharedBufferMapping cursor_location_mapping =
- handle->Map(sizeof(base::subtle::Atomic32));
- ASSERT_TRUE(cursor_location_mapping);
- cursor_location_memory =
- reinterpret_cast<base::subtle::Atomic32*>(cursor_location_mapping.get());
-
- base::subtle::Atomic32 location =
- base::subtle::NoBarrier_Load(cursor_location_memory);
- EXPECT_EQ(gfx::Point(static_cast<int16_t>(location >> 16),
- static_cast<int16_t>(location & 0xFFFF)),
- gfx::Point(-10, -11));
-}
-
} // namespace test
} // namespace ws
} // namespace ui
« no previous file with comments | « services/ui/ws/user_display_manager.cc ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698