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

Side by Side Diff: ui/display/chromeos/touchscreen_util_unittest.cc

Issue 2523873002: Remove DisplayChangeObserver ash dependencies. (Closed)
Patch Set: Remove comment. 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
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 "ui/display/chromeos/touchscreen_util.h" 5 #include "ui/display/chromeos/touchscreen_util.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 class TouchscreenUtilTest : public testing::Test { 23 class TouchscreenUtilTest : public testing::Test {
24 public: 24 public:
25 TouchscreenUtilTest() {} 25 TouchscreenUtilTest() {}
26 ~TouchscreenUtilTest() override {} 26 ~TouchscreenUtilTest() override {}
27 27
28 DisplayManager* display_manager() { return display_manager_.get(); } 28 DisplayManager* display_manager() { return display_manager_.get(); }
29 29
30 // testing::Test: 30 // testing::Test:
31 void SetUp() override { 31 void SetUp() override {
32 // Recreate for each test, DisplayManager has a lot of state. 32 // Recreate for each test, DisplayManager has a lot of state.
33 display_manager_ = 33 display_manager_ = base::MakeUnique<DisplayManager>(
34 base::MakeUnique<DisplayManager>(base::MakeUnique<ScreenBase>()); 34 base::MakeUnique<ScreenBase>(), nullptr);
35 35
36 // Internal display will always match to internal touchscreen. If internal 36 // Internal display will always match to internal touchscreen. If internal
37 // touchscreen can't be detected, it is then associated to a touch screen 37 // touchscreen can't be detected, it is then associated to a touch screen
38 // with matching size. 38 // with matching size.
39 { 39 {
40 ManagedDisplayInfo display(1, "1", false); 40 ManagedDisplayInfo display(1, "1", false);
41 scoped_refptr<ManagedDisplayMode> mode(new ManagedDisplayMode( 41 scoped_refptr<ManagedDisplayMode> mode(new ManagedDisplayMode(
42 gfx::Size(1920, 1080), 60.0, false /* interlaced */, 42 gfx::Size(1920, 1080), 60.0, false /* interlaced */,
43 true /* native */, 1.0 /* ui_scale */, 43 true /* native */, 1.0 /* ui_scale */,
44 1.0 /* device_scale_factor */)); 44 1.0 /* device_scale_factor */));
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 AssociateTouchscreens(&displays_, devices); 283 AssociateTouchscreens(&displays_, devices);
284 284
285 EXPECT_EQ(1u, displays_[0].input_devices().size()); 285 EXPECT_EQ(1u, displays_[0].input_devices().size());
286 EXPECT_EQ(1, displays_[0].input_devices()[0]); 286 EXPECT_EQ(1, displays_[0].input_devices()[0]);
287 EXPECT_EQ(0u, displays_[1].input_devices().size()); 287 EXPECT_EQ(0u, displays_[1].input_devices().size());
288 EXPECT_EQ(0u, displays_[2].input_devices().size()); 288 EXPECT_EQ(0u, displays_[2].input_devices().size());
289 EXPECT_EQ(0u, displays_[3].input_devices().size()); 289 EXPECT_EQ(0u, displays_[3].input_devices().size());
290 } 290 }
291 291
292 } // namespace display 292 } // namespace display
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698