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

Side by Side Diff: ui/views/corewm/cursor_manager_unittest.cc

Issue 145313003: Implement cursor compositing mode on Ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always update cursor image in SetCursor. Fixes initial wrong cursor. Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/views/corewm/cursor_manager.h" 5 #include "ui/views/corewm/cursor_manager.h"
6 6
7 #include "ui/aura/client/cursor_client_observer.h" 7 #include "ui/aura/client/cursor_client_observer.h"
8 #include "ui/views/corewm/native_cursor_manager.h" 8 #include "ui/views/corewm/native_cursor_manager.h"
9 #include "ui/views/test/views_test_base.h" 9 #include "ui/views/test/views_test_base.h"
10 10
(...skipping 28 matching lines...) Expand all
39 ui::CursorSetType cursor_set, 39 ui::CursorSetType cursor_set,
40 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE { 40 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {
41 delegate->CommitCursorSet(cursor_set); 41 delegate->CommitCursorSet(cursor_set);
42 } 42 }
43 43
44 virtual void SetScale( 44 virtual void SetScale(
45 float scale, 45 float scale,
46 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE { 46 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {
47 delegate->CommitScale(scale); 47 delegate->CommitScale(scale);
48 } 48 }
49
50 virtual void SetNativeCursorEnabled(
51 bool enabled,
52 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE {}
49 }; 53 };
50 54
51 } // namespace 55 } // namespace
52 56
53 class CursorManagerTest : public views::ViewsTestBase { 57 class CursorManagerTest : public views::ViewsTestBase {
54 protected: 58 protected:
55 CursorManagerTest() 59 CursorManagerTest()
56 : delegate_(new TestingCursorManager), 60 : delegate_(new TestingCursorManager),
57 cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>( 61 cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>(
58 delegate_)) { 62 delegate_)) {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 EXPECT_FALSE(observer_a.is_cursor_visible()); 348 EXPECT_FALSE(observer_a.is_cursor_visible());
345 349
346 // Show the cursor using ShowCursor(). 350 // Show the cursor using ShowCursor().
347 observer_a.reset(); 351 observer_a.reset();
348 observer_b.reset(); 352 observer_b.reset();
349 cursor_manager_.ShowCursor(); 353 cursor_manager_.ShowCursor();
350 EXPECT_TRUE(observer_a.did_visibility_change()); 354 EXPECT_TRUE(observer_a.did_visibility_change());
351 EXPECT_FALSE(observer_b.did_visibility_change()); 355 EXPECT_FALSE(observer_b.did_visibility_change());
352 EXPECT_TRUE(observer_a.is_cursor_visible()); 356 EXPECT_TRUE(observer_a.is_cursor_visible());
353 } 357 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698