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

Side by Side Diff: ui/views/animation/ink_drop_animation_controller_impl_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/animation/ink_drop_animation_controller_impl.h" 5 #include "ui/views/animation/ink_drop_animation_controller_impl.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/test/test_simple_task_runner.h" 8 #include "base/test/test_simple_task_runner.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 // The test target. 34 // The test target.
35 InkDropAnimationControllerImpl ink_drop_animation_controller_; 35 InkDropAnimationControllerImpl ink_drop_animation_controller_;
36 36
37 // Used to control the tasks scheduled by the InkDropAnimationControllerImpl's 37 // Used to control the tasks scheduled by the InkDropAnimationControllerImpl's
38 // Timer. 38 // Timer.
39 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 39 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
40 40
41 // Required by base::Timer's. 41 // Required by base::Timer's.
42 scoped_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_; 42 std::unique_ptr<base::ThreadTaskRunnerHandle> thread_task_runner_handle_;
43 43
44 private: 44 private:
45 // Ensures all animations complete immediately. 45 // Ensures all animations complete immediately.
46 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 46 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImplTest); 48 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImplTest);
49 }; 49 };
50 50
51 InkDropAnimationControllerImplTest::InkDropAnimationControllerImplTest() 51 InkDropAnimationControllerImplTest::InkDropAnimationControllerImplTest()
52 : ink_drop_animation_controller_(&ink_drop_host_), 52 : ink_drop_animation_controller_(&ink_drop_host_),
53 task_runner_(new base::TestSimpleTaskRunner), 53 task_runner_(new base::TestSimpleTaskRunner),
54 thread_task_runner_handle_( 54 thread_task_runner_handle_(
55 new base::ThreadTaskRunnerHandle(task_runner_)) { 55 new base::ThreadTaskRunnerHandle(task_runner_)) {
56 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( 56 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 ink_drop_animation_controller_.SetHovered(true); 132 ink_drop_animation_controller_.SetHovered(true);
133 133
134 EXPECT_TRUE(is_hover_fading_in_or_visible()); 134 EXPECT_TRUE(is_hover_fading_in_or_visible());
135 135
136 ink_drop_animation_controller_.SnapToActivated(); 136 ink_drop_animation_controller_.SnapToActivated();
137 137
138 EXPECT_FALSE(is_hover_fading_in_or_visible()); 138 EXPECT_FALSE(is_hover_fading_in_or_visible());
139 } 139 }
140 140
141 } // namespace views 141 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_animation_controller_impl.h ('k') | ui/views/animation/ink_drop_animation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698