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

Unified Diff: ui/aura/root_window_unittest.cc

Issue 149743006: Fix crash of OmniboxViewViewsTest.SelectAllOnClick on Linux Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: ui/aura/root_window_unittest.cc
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index a5a6283269af1f664d163dd7bf39e56deb298296..55d6f6a14f90a2ef14bc0c0d9aff2c8382da859b 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -1731,4 +1731,30 @@ TEST_F(RootWindowTestInHighDPI, TouchMovesHeldOnScroll) {
filter->touch_locations()[1].ToString());
}
+class RootWindowTestRotated : public RootWindowTest {
+ public:
+ RootWindowTestRotated() {}
+ virtual ~RootWindowTestRotated() {}
+
+ protected:
+ virtual void SetUp() OVERRIDE {
+ RootWindowTest::SetUp();
+ test_screen()->SetDisplayRotation(gfx::Display::ROTATE_90);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RootWindowTestRotated);
+};
+
+// Test how changing the bounds of the host window affects
+// Env::last_mouse_location().
+TEST_F(RootWindowTestRotated, BoundsChanged) {
sadrul 2014/02/14 19:18:10 Could this be part of RootWindowTest, and you set
pkotwicz 2014/02/14 19:57:18 Ok
+ dispatcher()->host()->SetBounds(gfx::Rect(800, 600));
+ dispatcher()->MoveCursorTo(gfx::Point(40, 30));
+ EXPECT_EQ("40,30", Env::GetInstance()->last_mouse_location().ToString());
+
+ dispatcher()->host()->SetBounds(gfx::Rect(800, 500));
+ EXPECT_EQ("40,30", Env::GetInstance()->last_mouse_location().ToString());
+}
+
} // namespace aura

Powered by Google App Engine
This is Rietveld 408576698