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

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

Issue 1540753002: Switch to standard integer types in ash/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arraysize Created 5 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 | « ash/touch/touch_transformer_controller.cc ('k') | ash/touch/touch_uma.h » ('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 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/devices/device_data_manager.h" 10 #include "ui/events/devices/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 16
17 DisplayInfo CreateDisplayInfo(int64 id, 17 DisplayInfo CreateDisplayInfo(int64_t id,
18 unsigned int touch_device_id, 18 unsigned int touch_device_id,
19 const gfx::Rect& bounds) { 19 const gfx::Rect& bounds) {
20 DisplayInfo info(id, std::string(), false); 20 DisplayInfo info(id, std::string(), false);
21 info.SetBounds(bounds); 21 info.SetBounds(bounds);
22 info.AddInputDevice(touch_device_id); 22 info.AddInputDevice(touch_device_id);
23 23
24 // Create a default mode. 24 // Create a default mode.
25 std::vector<DisplayMode> default_modes( 25 std::vector<DisplayMode> default_modes(
26 1, DisplayMode(bounds.size(), 60, false, true)); 26 1, DisplayMode(bounds.size(), 60, false, true));
27 info.SetDisplayModes(default_modes); 27 info.SetDisplayModes(default_modes);
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 CreateTouchscreenDevice(5, gfx::Size(1001, 1001)); 344 CreateTouchscreenDevice(5, gfx::Size(1001, 1001));
345 345
346 TouchTransformerController* tt_controller = 346 TouchTransformerController* tt_controller =
347 Shell::GetInstance()->touch_transformer_controller(); 347 Shell::GetInstance()->touch_transformer_controller();
348 // Default touchscreen position range is 1001x1001; 348 // Default touchscreen position range is 1001x1001;
349 EXPECT_EQ(sqrt((2560.0 * 1600.0) / (1001.0 * 1001.0)), 349 EXPECT_EQ(sqrt((2560.0 * 1600.0) / (1001.0 * 1001.0)),
350 tt_controller->GetTouchResolutionScale(display, touch_device)); 350 tt_controller->GetTouchResolutionScale(display, touch_device));
351 } 351 }
352 352
353 } // namespace ash 353 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_transformer_controller.cc ('k') | ash/touch/touch_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698