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

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

Issue 2499523003: Add ink drop masking to TrayBackgroundView (Closed)
Patch Set: Addressed review comments Created 4 years, 1 month 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 <memory> 5 #include <memory>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/test/test_mock_time_task_runner.h" 8 #include "base/test/test_mock_time_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 InkDropTest::InkDropTest() : ink_drop_(nullptr) { 51 InkDropTest::InkDropTest() : ink_drop_(nullptr) {
52 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( 52 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode(
53 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); 53 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION));
54 54
55 switch (GetInkDropType()) { 55 switch (GetInkDropType()) {
56 case INK_DROP_STUB: 56 case INK_DROP_STUB:
57 ink_drop_.reset(new InkDropStub()); 57 ink_drop_.reset(new InkDropStub());
58 break; 58 break;
59 case INK_DROP_IMPL: 59 case INK_DROP_IMPL:
60 ink_drop_.reset(new InkDropImpl(&test_ink_drop_host_)); 60 ink_drop_.reset(new InkDropImpl(&test_ink_drop_host_, gfx::Size()));
61 // The Timer's used by the InkDropImpl class require a 61 // The Timer's used by the InkDropImpl class require a
62 // base::ThreadTaskRunnerHandle instance. 62 // base::ThreadTaskRunnerHandle instance.
63 scoped_refptr<base::TestMockTimeTaskRunner> task_runner( 63 scoped_refptr<base::TestMockTimeTaskRunner> task_runner(
64 new base::TestMockTimeTaskRunner); 64 new base::TestMockTimeTaskRunner);
65 thread_task_runner_handle_.reset( 65 thread_task_runner_handle_.reset(
66 new base::ThreadTaskRunnerHandle(task_runner)); 66 new base::ThreadTaskRunnerHandle(task_runner));
67 break; 67 break;
68 } 68 }
69 } 69 }
70 70
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 TEST_P(InkDropTest, TypicalSlowActivated) { 127 TEST_P(InkDropTest, TypicalSlowActivated) {
128 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING); 128 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING);
129 ink_drop_->AnimateToState(InkDropState::ALTERNATE_ACTION_PENDING); 129 ink_drop_->AnimateToState(InkDropState::ALTERNATE_ACTION_PENDING);
130 ink_drop_->AnimateToState(InkDropState::ACTIVATED); 130 ink_drop_->AnimateToState(InkDropState::ACTIVATED);
131 ink_drop_->AnimateToState(InkDropState::DEACTIVATED); 131 ink_drop_->AnimateToState(InkDropState::DEACTIVATED);
132 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState()); 132 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState());
133 } 133 }
134 134
135 } // namespace test 135 } // namespace test
136 } // namespace views 136 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698