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

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

Issue 2816923002: change overlay scrollbar hover show to hover fade in (Closed)
Patch Set: combine fade_in_delay and fade_out_delay to fade_delay 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_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_duration =
112 base::TimeDelta::FromMilliseconds(20);
113 layer_tree_settings_.scrollbar_fade_out_duration =
114 base::TimeDelta::FromMilliseconds(20); 112 base::TimeDelta::FromMilliseconds(20);
115 113
116 scrollbar_layer_id_ = -1; 114 scrollbar_layer_id_ = -1;
117 115
118 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN); 116 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
119 117
120 LayerTreeHost::InitParams params; 118 LayerTreeHost::InitParams params;
121 params.client = &fake_client_; 119 params.client = &fake_client_;
122 params.settings = &layer_tree_settings_; 120 params.settings = &layer_tree_settings_;
123 params.task_graph_runner = &task_graph_runner_; 121 params.task_graph_runner = &task_graph_runner_;
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); 1247 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f);
1250 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); 1248 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f);
1251 1249
1252 // Horizontal Scrollbars. 1250 // Horizontal Scrollbars.
1253 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); 1251 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f);
1254 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); 1252 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f);
1255 } 1253 }
1256 1254
1257 } // namespace 1255 } // namespace
1258 } // namespace cc 1256 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/scrollbar_animation_controller_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698