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

Side by Side Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 2816923002: change overlay scrollbar hover show to hover fade in (Closed)
Patch Set: merge FadeInDuration and FadeOutDuration to FadeDuration Created 3 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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <unordered_map> 7 #include <unordered_map>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 int total_ui_resource_deleted_; 99 int total_ui_resource_deleted_;
100 }; 100 };
101 101
102 class ScrollbarLayerTest : public testing::Test { 102 class ScrollbarLayerTest : public testing::Test {
103 public: 103 public:
104 ScrollbarLayerTest() { 104 ScrollbarLayerTest() {
105 layer_tree_settings_.single_thread_proxy_scheduler = false; 105 layer_tree_settings_.single_thread_proxy_scheduler = false;
106 layer_tree_settings_.use_zero_copy = true; 106 layer_tree_settings_.use_zero_copy = true;
107 layer_tree_settings_.scrollbar_animator = 107 layer_tree_settings_.scrollbar_animator =
108 LayerTreeSettings::ANDROID_OVERLAY; 108 LayerTreeSettings::ANDROID_OVERLAY;
109 layer_tree_settings_.scrollbar_show_delay = 109 layer_tree_settings_.scrollbar_fade_in_delay =
110 base::TimeDelta::FromMilliseconds(20); 110 base::TimeDelta::FromMilliseconds(20);
111 layer_tree_settings_.scrollbar_fade_out_delay = 111 layer_tree_settings_.scrollbar_fade_out_delay =
112 base::TimeDelta::FromMilliseconds(20); 112 base::TimeDelta::FromMilliseconds(20);
113 layer_tree_settings_.scrollbar_fade_out_duration = 113 layer_tree_settings_.scrollbar_fade_duration =
114 base::TimeDelta::FromMilliseconds(20); 114 base::TimeDelta::FromMilliseconds(20);
115 115
116 scrollbar_layer_id_ = -1; 116 scrollbar_layer_id_ = -1;
117 117
118 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN); 118 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
119 119
120 LayerTreeHost::InitParams params; 120 LayerTreeHost::InitParams params;
121 params.client = &fake_client_; 121 params.client = &fake_client_;
122 params.settings = &layer_tree_settings_; 122 params.settings = &layer_tree_settings_;
123 params.task_graph_runner = &task_graph_runner_; 123 params.task_graph_runner = &task_graph_runner_;
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); 1248 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f);
1249 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); 1249 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f);
1250 1250
1251 // Horizontal Scrollbars. 1251 // Horizontal Scrollbars.
1252 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); 1252 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f);
1253 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); 1253 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f);
1254 } 1254 }
1255 1255
1256 } // namespace 1256 } // namespace
1257 } // namespace cc 1257 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698