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

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

Issue 2843293004: change overlay scrollbar hover show to hover fade in (Closed)
Patch Set: Created 3 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 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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); 1233 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f);
1236 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); 1234 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f);
1237 1235
1238 // Horizontal Scrollbars. 1236 // Horizontal Scrollbars.
1239 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); 1237 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f);
1240 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); 1238 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f);
1241 } 1239 }
1242 1240
1243 } // namespace 1241 } // namespace
1244 } // namespace cc 1242 } // 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