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

Side by Side Diff: ui/aura/window_unittest.cc

Issue 2525113002: Rename WindowTreeHost functions to indicate pixels/dips. (Closed)
Patch Set: win Created 4 years 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
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/chromeos/touch_exploration_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 EXPECT_FALSE(w_test_api.ContainsMouse()); 434 EXPECT_FALSE(w_test_api.ContainsMouse());
435 } 435 }
436 436
437 // Test Window::ConvertPointToWindow() with transform to root_window. 437 // Test Window::ConvertPointToWindow() with transform to root_window.
438 TEST_P(WindowTest, MoveCursorToWithTransformRootWindow) { 438 TEST_P(WindowTest, MoveCursorToWithTransformRootWindow) {
439 gfx::Transform transform; 439 gfx::Transform transform;
440 transform.Translate(100.0, 100.0); 440 transform.Translate(100.0, 100.0);
441 transform.Rotate(90.0); 441 transform.Rotate(90.0);
442 transform.Scale(2.0, 5.0); 442 transform.Scale(2.0, 5.0);
443 host()->SetRootTransform(transform); 443 host()->SetRootTransform(transform);
444 host()->MoveCursorTo(gfx::Point(10, 10)); 444 host()->MoveCursorToLocationInDIP(gfx::Point(10, 10));
445 #if !defined(OS_WIN) 445 #if !defined(OS_WIN)
446 // TODO(yoshiki): fix this to build on Windows. See crbug.com/133413.OD 446 // TODO(yoshiki): fix this to build on Windows. See crbug.com/133413.OD
447 EXPECT_EQ("50,120", QueryLatestMousePositionRequestInHost(host()).ToString()); 447 EXPECT_EQ("50,120", QueryLatestMousePositionRequestInHost(host()).ToString());
448 #endif 448 #endif
449 EXPECT_EQ("10,10", 449 EXPECT_EQ("10,10",
450 display::Screen::GetScreen()->GetCursorScreenPoint().ToString()); 450 display::Screen::GetScreen()->GetCursorScreenPoint().ToString());
451 } 451 }
452 452
453 // Tests Window::ConvertPointToWindow() with transform to non-root windows. 453 // Tests Window::ConvertPointToWindow() with transform to non-root windows.
454 TEST_P(WindowTest, MoveCursorToWithTransformWindow) { 454 TEST_P(WindowTest, MoveCursorToWithTransformWindow) {
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 ::testing::Values(BackendType::CLASSIC, 2987 ::testing::Values(BackendType::CLASSIC,
2988 BackendType::MUS)); 2988 BackendType::MUS));
2989 2989
2990 INSTANTIATE_TEST_CASE_P(/* no prefix */, 2990 INSTANTIATE_TEST_CASE_P(/* no prefix */,
2991 WindowObserverTest, 2991 WindowObserverTest,
2992 ::testing::Values(BackendType::CLASSIC, 2992 ::testing::Values(BackendType::CLASSIC,
2993 BackendType::MUS)); 2993 BackendType::MUS));
2994 2994
2995 } // namespace test 2995 } // namespace test
2996 } // namespace aura 2996 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/chromeos/touch_exploration_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698