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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 const EventFilterRecorder::Events& events = filter->events(); 1724 const EventFilterRecorder::Events& events = filter->events();
1725 EXPECT_EQ("TOUCH_MOVED TOUCH_RELEASED GESTURE_SCROLL_END GESTURE_END", 1725 EXPECT_EQ("TOUCH_MOVED TOUCH_RELEASED GESTURE_SCROLL_END GESTURE_END",
1726 EventTypesToString(events)); 1726 EventTypesToString(events));
1727 ASSERT_EQ(2u, filter->touch_locations().size()); 1727 ASSERT_EQ(2u, filter->touch_locations().size());
1728 EXPECT_EQ(gfx::Point(-40, 10).ToString(), 1728 EXPECT_EQ(gfx::Point(-40, 10).ToString(),
1729 filter->touch_locations()[0].ToString()); 1729 filter->touch_locations()[0].ToString());
1730 EXPECT_EQ(gfx::Point(-40, 10).ToString(), 1730 EXPECT_EQ(gfx::Point(-40, 10).ToString(),
1731 filter->touch_locations()[1].ToString()); 1731 filter->touch_locations()[1].ToString());
1732 } 1732 }
1733 1733
1734 class RootWindowTestRotated : public RootWindowTest {
1735 public:
1736 RootWindowTestRotated() {}
1737 virtual ~RootWindowTestRotated() {}
1738
1739 protected:
1740 virtual void SetUp() OVERRIDE {
1741 RootWindowTest::SetUp();
1742 test_screen()->SetDisplayRotation(gfx::Display::ROTATE_90);
1743 }
1744
1745 private:
1746 DISALLOW_COPY_AND_ASSIGN(RootWindowTestRotated);
1747 };
1748
1749 // Test how changing the bounds of the host window affects
1750 // Env::last_mouse_location().
1751 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
1752 dispatcher()->host()->SetBounds(gfx::Rect(800, 600));
1753 dispatcher()->MoveCursorTo(gfx::Point(40, 30));
1754 EXPECT_EQ("40,30", Env::GetInstance()->last_mouse_location().ToString());
1755
1756 dispatcher()->host()->SetBounds(gfx::Rect(800, 500));
1757 EXPECT_EQ("40,30", Env::GetInstance()->last_mouse_location().ToString());
1758 }
1759
1734 } // namespace aura 1760 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698