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

Unified Diff: ui/aura/root_window_unittest.cc

Issue 13916004: Translate 1 pixel not 1 dip when rotating the display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove chromeos specific test that is no longer necessary Created 7 years, 8 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/aura/root_window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_unittest.cc
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index 43b43ca3ec529a6479d454cb56cd9ec29d68079d..d7f5fa8da67999eee638383ce33bc1cb332e91bd 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -209,47 +209,6 @@ TEST_F(RootWindowTest, TranslatedEvent) {
EXPECT_EQ("100,100", translated_event.root_location().ToString());
}
-#if defined(OS_CHROMEOS)
-// Make sure the mouse location is translated within the root
-// window. crbug.com/222483.
-TEST_F(RootWindowTest, KeepTranslatedEventInRoot) {
- // Clockwise.
- gfx::Transform rotate;
- rotate.Translate(599, 0);
- rotate.Rotate(90);
- root_window()->SetTransform(rotate);
-
- gfx::Point top_edge_on_host(100, 0);
- ui::MouseEvent top_event(ui::ET_MOUSE_PRESSED,
- top_edge_on_host,
- top_edge_on_host, 0);
- root_window()->TransformEventForDeviceScaleFactor(true, &top_event);
- EXPECT_TRUE(root_window()->bounds().Contains(top_event.location()));
-
- // Counter clockwise.
- rotate.MakeIdentity();
- rotate.Translate(0, 799);
- rotate.Rotate(270);
- root_window()->SetTransform(rotate);
-
- gfx::Point bottom_edge_on_host(500, 799);
- ui::MouseEvent bottom_event(ui::ET_MOUSE_PRESSED,
- bottom_edge_on_host,
- bottom_edge_on_host, 0);
- root_window()->TransformEventForDeviceScaleFactor(true, &bottom_event);
- EXPECT_TRUE(root_window()->bounds().Contains(bottom_event.location()));
-
- // The locaion can be outside if |keep_inside_root| is false.
- ui::MouseEvent bottom_event_outside(ui::ET_MOUSE_PRESSED,
- bottom_edge_on_host,
- bottom_edge_on_host, 0);
- root_window()->TransformEventForDeviceScaleFactor(false,
- &bottom_event_outside);
- EXPECT_FALSE(root_window()->bounds().Contains(
- bottom_event_outside.location()));
-}
-#endif
-
namespace {
class TestEventClient : public client::EventClient {
« no previous file with comments | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698