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

Side by Side Diff: chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc

Issue 2780623002: exo: Fix multi-display hardware cursor (Closed)
Patch Set: Fix style error Created 3 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
« no previous file with comments | « no previous file | components/exo/pointer.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bri dge.h" 5 #include "chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bri dge.h"
6 6
7 #include <unordered_map> 7 #include <unordered_map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "chromeos/chromeos_switches.h" 11 #include "chromeos/chromeos_switches.h"
12 #include "components/arc/arc_bridge_service.h" 12 #include "components/arc/arc_bridge_service.h"
13 #include "components/arc/common/accessibility_helper.mojom.h" 13 #include "components/arc/common/accessibility_helper.mojom.h"
14 #include "components/exo/wm_helper.h" 14 #include "components/exo/wm_helper.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/display/display.h"
16 #include "ui/display/manager/managed_display_info.h" 17 #include "ui/display/manager/managed_display_info.h"
17 18
18 namespace arc { 19 namespace arc {
19 20
20 class ArcAccessibilityHelperBridgeTest : public testing::Test { 21 class ArcAccessibilityHelperBridgeTest : public testing::Test {
21 public: 22 public:
22 class FakeWMHelper : public exo::WMHelper { 23 class FakeWMHelper : public exo::WMHelper {
23 public: 24 public:
24 FakeWMHelper() = default; 25 FakeWMHelper() = default;
25 26
26 private: 27 private:
27 const display::ManagedDisplayInfo GetDisplayInfo( 28 const display::ManagedDisplayInfo& GetDisplayInfo(
28 int64_t display_id) const override { 29 int64_t display_id) const override {
29 return display::ManagedDisplayInfo(display_id, "", false); 30 static const display::ManagedDisplayInfo info;
31 return info;
30 } 32 }
31 aura::Window* GetContainer(int container_id) override { return nullptr; } 33 aura::Window* GetPrimaryDisplayContainer(int container_id) override {
34 return nullptr;
35 }
32 aura::Window* GetActiveWindow() const override { return nullptr; } 36 aura::Window* GetActiveWindow() const override { return nullptr; }
33 aura::Window* GetFocusedWindow() const override { return nullptr; } 37 aura::Window* GetFocusedWindow() const override { return nullptr; }
34 ui::CursorSetType GetCursorSet() const override { 38 ui::CursorSetType GetCursorSet() const override {
35 return ui::CursorSetType::CURSOR_SET_NORMAL; 39 return ui::CursorSetType::CURSOR_SET_NORMAL;
36 } 40 }
41 const display::Display& GetCursorDisplay() const override {
42 static const display::Display display;
43 return display;
44 }
37 void AddPreTargetHandler(ui::EventHandler* handler) override {} 45 void AddPreTargetHandler(ui::EventHandler* handler) override {}
38 void PrependPreTargetHandler(ui::EventHandler* handler) override {} 46 void PrependPreTargetHandler(ui::EventHandler* handler) override {}
39 void RemovePreTargetHandler(ui::EventHandler* handler) override {} 47 void RemovePreTargetHandler(ui::EventHandler* handler) override {}
40 void AddPostTargetHandler(ui::EventHandler* handler) override {} 48 void AddPostTargetHandler(ui::EventHandler* handler) override {}
41 void RemovePostTargetHandler(ui::EventHandler* handler) override {} 49 void RemovePostTargetHandler(ui::EventHandler* handler) override {}
42 bool IsMaximizeModeWindowManagerEnabled() const override { return false; } 50 bool IsMaximizeModeWindowManagerEnabled() const override { return false; }
43 51
44 DISALLOW_COPY_AND_ASSIGN(FakeWMHelper); 52 DISALLOW_COPY_AND_ASSIGN(FakeWMHelper);
45 }; 53 };
46 54
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 helper_bridge->OnAccessibilityEvent(event.Clone()); 164 helper_bridge->OnAccessibilityEvent(event.Clone());
157 ASSERT_EQ(0U, package_to_tree.size()); 165 ASSERT_EQ(0U, package_to_tree.size());
158 166
159 // Task 1 is now current. 167 // Task 1 is now current.
160 helper_bridge->OnTaskSetActive(1); 168 helper_bridge->OnTaskSetActive(1);
161 helper_bridge->OnAccessibilityEvent(event.Clone()); 169 helper_bridge->OnAccessibilityEvent(event.Clone());
162 ASSERT_EQ(1U, package_to_tree.size()); 170 ASSERT_EQ(1U, package_to_tree.size());
163 } 171 }
164 172
165 } // namespace arc 173 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | components/exo/pointer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698