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

Side by Side Diff: ash/touch/touch_transformer_controller_unittest.cc

Issue 289283015: Extract touchscreen device management into a generic manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/touch/touch_transformer_controller.h" 5 #include "ash/touch/touch_transformer_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ui/aura/window_tree_host.h" 9 #include "ui/aura/window_tree_host.h"
10 #include "ui/events/x/device_data_manager.h" 10 #include "ui/events/device_data_manager.h"
11 #include "ui/gfx/display.h" 11 #include "ui/gfx/display.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 namespace { 15 namespace {
16 DisplayInfo CreateDisplayInfo(int64 id, 16 DisplayInfo CreateDisplayInfo(int64 id,
17 int touch_device_id, 17 int touch_device_id,
18 const gfx::Rect& bounds) { 18 const gfx::Rect& bounds) {
19 DisplayInfo info(id, std::string(), false); 19 DisplayInfo info(id, std::string(), false);
20 info.SetBounds(bounds); 20 info.SetBounds(bounds);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 EXPECT_EQ(0, static_cast<int>(y)); 197 EXPECT_EQ(0, static_cast<int>(y));
198 198
199 x = 2559.0; 199 x = 2559.0;
200 y = 2427.0; 200 y = 2427.0;
201 device_manager->ApplyTouchTransformer(6, &x, &y); 201 device_manager->ApplyTouchTransformer(6, &x, &y);
202 EXPECT_EQ(2559, static_cast<int>(x)); 202 EXPECT_EQ(2559, static_cast<int>(x));
203 EXPECT_EQ(1599, static_cast<int>(y)); 203 EXPECT_EQ(1599, static_cast<int>(y));
204 } 204 }
205 205
206 } // namespace ash 206 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_transformer_controller.cc ('k') | ash/wm/maximize_mode/internal_input_device_list_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698