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

Unified Diff: ash/aura/pointer_watcher_adapter_unittest.cc

Issue 2267023003: ash: Eliminate PointerWatcherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/aura/pointer_watcher_adapter.cc ('k') | ash/aura/wm_shell_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/pointer_watcher_adapter_unittest.cc
diff --git a/ash/pointer_watcher_delegate_aura_unittest.cc b/ash/aura/pointer_watcher_adapter_unittest.cc
similarity index 92%
rename from ash/pointer_watcher_delegate_aura_unittest.cc
rename to ash/aura/pointer_watcher_adapter_unittest.cc
index a6c99cb511dd851fdfdc969955f2e07ba88a1238..c0a67685e9c08867d78d3c4f964dde6716aab63e 100644
--- a/ash/pointer_watcher_delegate_aura_unittest.cc
+++ b/ash/aura/pointer_watcher_adapter_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/shell.h"
+#include "ash/common/wm_shell.h"
#include "ash/test/ash_test_base.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event.h"
@@ -12,18 +12,16 @@
namespace ash {
-using PointerWatcherDelegateAuraTest = test::AshTestBase;
+using PointerWatcherAdapterTest = test::AshTestBase;
// Records calls to OnPointerEventObserved() in |pointer_event_count_| and
// calls to OnMouseCaptureChanged() to |capture_changed_count_|.
class TestPointerWatcher : public views::PointerWatcher {
public:
explicit TestPointerWatcher(bool wants_moves) {
- Shell::GetInstance()->AddPointerWatcher(this, wants_moves);
- }
- ~TestPointerWatcher() override {
- Shell::GetInstance()->RemovePointerWatcher(this);
+ WmShell::Get()->AddPointerWatcher(this, wants_moves);
}
+ ~TestPointerWatcher() override { WmShell::Get()->RemovePointerWatcher(this); }
void ClearCounts() { pointer_event_count_ = capture_changed_count_ = 0; }
@@ -75,7 +73,7 @@ class TestHelper {
DISALLOW_COPY_AND_ASSIGN(TestHelper);
};
-TEST_F(PointerWatcherDelegateAuraTest, MouseEvents) {
+TEST_F(PointerWatcherAdapterTest, MouseEvents) {
TestHelper helper;
// Move: only the move PointerWatcher should get the event.
@@ -115,7 +113,7 @@ TEST_F(PointerWatcherDelegateAuraTest, MouseEvents) {
helper.ExpectCallCount(0, 1, 0, 1);
}
-TEST_F(PointerWatcherDelegateAuraTest, TouchEvents) {
+TEST_F(PointerWatcherAdapterTest, TouchEvents) {
TestHelper helper;
// Press: both.
« no previous file with comments | « ash/aura/pointer_watcher_adapter.cc ('k') | ash/aura/wm_shell_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698