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

Unified Diff: ash/touch/touch_transformer_controller_unittest.cc

Issue 922843002: Fix software mirror mode on Ozone part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « ash/touch/touch_transformer_controller.cc ('k') | ui/events/devices/device_data_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touch_transformer_controller_unittest.cc
diff --git a/ash/touch/touch_transformer_controller_unittest.cc b/ash/touch/touch_transformer_controller_unittest.cc
index d5fbebd9b52cffc6f811a5869714798d0d6b20f2..2a5131a2c9539fdec943d36710807865a79ddda1 100644
--- a/ash/touch/touch_transformer_controller_unittest.cc
+++ b/ash/touch/touch_transformer_controller_unittest.cc
@@ -77,13 +77,13 @@ TEST_F(TouchTransformerControllerTest, MirrorModeLetterboxing) {
internal_touchscreen, fb_size));
device_manager->UpdateTouchInfoForDisplay(
- external_display_info.id(), external_display_info.touch_device_id(),
+ internal_display_info.id(), external_display_info.touch_device_id(),
tt_controller->GetTouchTransform(external_display_info,
external_display_info,
external_touchscreen, fb_size));
- EXPECT_EQ(1, device_manager->GetDisplayForTouchDevice(10));
- EXPECT_EQ(2, device_manager->GetDisplayForTouchDevice(11));
+ EXPECT_EQ(1, device_manager->GetTargetDisplayForTouchDevice(10));
+ EXPECT_EQ(1, device_manager->GetTargetDisplayForTouchDevice(11));
// External touch display has the default TouchTransformer.
float x = 100.0;
@@ -148,13 +148,13 @@ TEST_F(TouchTransformerControllerTest, MirrorModePillarboxing) {
internal_touchscreen, fb_size));
device_manager->UpdateTouchInfoForDisplay(
- external_display_info.id(), external_display_info.touch_device_id(),
+ internal_display_info.id(), external_display_info.touch_device_id(),
tt_controller->GetTouchTransform(external_display_info,
external_display_info,
external_touchscreen, fb_size));
- EXPECT_EQ(1, device_manager->GetDisplayForTouchDevice(10));
- EXPECT_EQ(2, device_manager->GetDisplayForTouchDevice(11));
+ EXPECT_EQ(1, device_manager->GetTargetDisplayForTouchDevice(10));
+ EXPECT_EQ(1, device_manager->GetTargetDisplayForTouchDevice(11));
// External touch display has the default TouchTransformer.
float x = 100.0;
@@ -221,12 +221,12 @@ TEST_F(TouchTransformerControllerTest, SoftwareMirrorMode) {
display1_touchscreen, fb_size));
device_manager->UpdateTouchInfoForDisplay(
- display2_info.id(), display2_info.touch_device_id(),
+ display1_info.id(), display2_info.touch_device_id(),
tt_controller->GetTouchTransform(display1_info, display2_info,
display2_touchscreen, fb_size));
- EXPECT_EQ(1, device_manager->GetDisplayForTouchDevice(10));
- EXPECT_EQ(2, device_manager->GetDisplayForTouchDevice(11));
+ EXPECT_EQ(1, device_manager->GetTargetDisplayForTouchDevice(10));
+ EXPECT_EQ(1, device_manager->GetTargetDisplayForTouchDevice(11));
// Mapping for touch events from display 1's touchscreen:
// [0, 1920) x [0, 1990) -> [0, 1280) x [0, 850)
@@ -295,8 +295,8 @@ TEST_F(TouchTransformerControllerTest, ExtendedMode) {
tt_controller->GetTouchTransform(display2, display2, touchscreen2,
fb_size));
- EXPECT_EQ(1, device_manager->GetDisplayForTouchDevice(5));
- EXPECT_EQ(2, device_manager->GetDisplayForTouchDevice(6));
+ EXPECT_EQ(1, device_manager->GetTargetDisplayForTouchDevice(5));
+ EXPECT_EQ(2, device_manager->GetTargetDisplayForTouchDevice(6));
// Mapping for touch events from internal touch display:
// [0, 2560) x [0, 2428) -> [0, 1366) x [0, 768)
« no previous file with comments | « ash/touch/touch_transformer_controller.cc ('k') | ui/events/devices/device_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698