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

Side by Side Diff: cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc

Issue 628443002: replace OVERRIDE and FINAL with override and final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/animation/scrollbar_animation_controller_linear_fade.h" 5 #include "cc/animation/scrollbar_animation_controller_linear_fade.h"
6 6
7 #include "cc/layers/solid_color_scrollbar_layer_impl.h" 7 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
8 #include "cc/test/fake_impl_proxy.h" 8 #include "cc/test/fake_impl_proxy.h"
9 #include "cc/test/fake_layer_tree_host_impl.h" 9 #include "cc/test/fake_layer_tree_host_impl.h"
10 #include "cc/test/test_shared_bitmap_manager.h" 10 #include "cc/test/test_shared_bitmap_manager.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace cc { 13 namespace cc {
14 namespace { 14 namespace {
15 15
16 class ScrollbarAnimationControllerLinearFadeTest 16 class ScrollbarAnimationControllerLinearFadeTest
17 : public testing::Test, 17 : public testing::Test,
18 public ScrollbarAnimationControllerClient { 18 public ScrollbarAnimationControllerClient {
19 public: 19 public:
20 ScrollbarAnimationControllerLinearFadeTest() 20 ScrollbarAnimationControllerLinearFadeTest()
21 : host_impl_(&proxy_, &shared_bitmap_manager_), needs_frame_count_(0) {} 21 : host_impl_(&proxy_, &shared_bitmap_manager_), needs_frame_count_(0) {}
22 22
23 virtual void PostDelayedScrollbarFade(const base::Closure& start_fade, 23 virtual void PostDelayedScrollbarFade(const base::Closure& start_fade,
24 base::TimeDelta delay) OVERRIDE { 24 base::TimeDelta delay) override {
25 start_fade_ = start_fade; 25 start_fade_ = start_fade;
26 } 26 }
27 virtual void SetNeedsScrollbarAnimationFrame() OVERRIDE { 27 virtual void SetNeedsScrollbarAnimationFrame() override {
28 needs_frame_count_++; 28 needs_frame_count_++;
29 } 29 }
30 30
31 protected: 31 protected:
32 virtual void SetUp() { 32 virtual void SetUp() {
33 const int kThumbThickness = 10; 33 const int kThumbThickness = 10;
34 const int kTrackStart = 0; 34 const int kTrackStart = 0;
35 const bool kIsLeftSideVerticalScrollbar = false; 35 const bool kIsLeftSideVerticalScrollbar = false;
36 const bool kIsOverlayScrollbar = true; // Allow opacity animations. 36 const bool kIsOverlayScrollbar = true; // Allow opacity animations.
37 37
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 scrollbar_controller_->DidScrollUpdate(); 258 scrollbar_controller_->DidScrollUpdate();
259 EXPECT_FLOAT_EQ(1, scrollbar_layer_->opacity()); 259 EXPECT_FLOAT_EQ(1, scrollbar_layer_->opacity());
260 260
261 time += base::TimeDelta::FromSeconds(1); 261 time += base::TimeDelta::FromSeconds(1);
262 scrollbar_controller_->DidScrollEnd(); 262 scrollbar_controller_->DidScrollEnd();
263 EXPECT_FLOAT_EQ(1, scrollbar_layer_->opacity()); 263 EXPECT_FLOAT_EQ(1, scrollbar_layer_->opacity());
264 } 264 }
265 265
266 } // namespace 266 } // namespace
267 } // namespace cc 267 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/scrollbar_animation_controller_linear_fade.h ('k') | cc/animation/scrollbar_animation_controller_thinning.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698