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

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

Issue 1963193002: Ink Drop cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tdanderson@ nit from patch set 1. Created 4 years, 7 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_factory.h" 5 #include "ui/views/animation/ink_drop_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/test/test_mock_time_task_runner.h" 10 #include "base/test/test_mock_time_task_runner.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 InkDropFactory::CreateInkDrop(&test_ink_drop_host_).release()); 61 InkDropFactory::CreateInkDrop(&test_ink_drop_host_).release());
62 62
63 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( 63 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode(
64 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); 64 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION));
65 65
66 switch (GetMaterialMode()) { 66 switch (GetMaterialMode()) {
67 case ui::MaterialDesignController::NON_MATERIAL: 67 case ui::MaterialDesignController::NON_MATERIAL:
68 break; 68 break;
69 case ui::MaterialDesignController::MATERIAL_NORMAL: 69 case ui::MaterialDesignController::MATERIAL_NORMAL:
70 case ui::MaterialDesignController::MATERIAL_HYBRID: 70 case ui::MaterialDesignController::MATERIAL_HYBRID:
71 // The Timer's used by the InkDropAnimationControllerImpl class require a 71 // The Timer's used by the InkDropImpl class require a
72 // base::ThreadTaskRunnerHandle instance. 72 // base::ThreadTaskRunnerHandle instance.
73 scoped_refptr<base::TestMockTimeTaskRunner> task_runner( 73 scoped_refptr<base::TestMockTimeTaskRunner> task_runner(
74 new base::TestMockTimeTaskRunner); 74 new base::TestMockTimeTaskRunner);
75 thread_task_runner_handle_.reset( 75 thread_task_runner_handle_.reset(
76 new base::ThreadTaskRunnerHandle(task_runner)); 76 new base::ThreadTaskRunnerHandle(task_runner));
77 break; 77 break;
78 } 78 }
79 } 79 }
80 80
81 InkDropFactoryTest::~InkDropFactoryTest() { 81 InkDropFactoryTest::~InkDropFactoryTest() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 TEST_P(InkDropFactoryTest, TypicalSlowActivated) { 150 TEST_P(InkDropFactoryTest, TypicalSlowActivated) {
151 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING); 151 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING);
152 ink_drop_->AnimateToState(InkDropState::ALTERNATE_ACTION_PENDING); 152 ink_drop_->AnimateToState(InkDropState::ALTERNATE_ACTION_PENDING);
153 ink_drop_->AnimateToState(InkDropState::ACTIVATED); 153 ink_drop_->AnimateToState(InkDropState::ACTIVATED);
154 ink_drop_->AnimateToState(InkDropState::DEACTIVATED); 154 ink_drop_->AnimateToState(InkDropState::DEACTIVATED);
155 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState()); 155 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState());
156 } 156 }
157 157
158 } // namespace views 158 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_animation_controller_impl.cc ('k') | ui/views/animation/ink_drop_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698