| OLD | NEW |
| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 int total_ui_resource_deleted_; | 98 int total_ui_resource_deleted_; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 class ScrollbarLayerTest : public testing::Test { | 101 class ScrollbarLayerTest : public testing::Test { |
| 102 public: | 102 public: |
| 103 ScrollbarLayerTest() { | 103 ScrollbarLayerTest() { |
| 104 layer_tree_settings_.single_thread_proxy_scheduler = false; | 104 layer_tree_settings_.single_thread_proxy_scheduler = false; |
| 105 layer_tree_settings_.use_zero_copy = true; | 105 layer_tree_settings_.use_zero_copy = true; |
| 106 layer_tree_settings_.scrollbar_animator = | 106 layer_tree_settings_.scrollbar_animator = |
| 107 LayerTreeSettings::ANDROID_OVERLAY; | 107 LayerTreeSettings::ANDROID_OVERLAY; |
| 108 layer_tree_settings_.scrollbar_fade_delay = | 108 layer_tree_settings_.scrollbar_fade_in_delay = |
| 109 base::TimeDelta::FromMilliseconds(20); | 109 base::TimeDelta::FromMilliseconds(20); |
| 110 layer_tree_settings_.scrollbar_fade_duration = | 110 layer_tree_settings_.scrollbar_fade_out_delay = |
| 111 base::TimeDelta::FromMilliseconds(20); |
| 112 layer_tree_settings_.scrollbar_fade_out_duration = |
| 111 base::TimeDelta::FromMilliseconds(20); | 113 base::TimeDelta::FromMilliseconds(20); |
| 112 layer_tree_settings_.verify_clip_tree_calculations = true; | 114 layer_tree_settings_.verify_clip_tree_calculations = true; |
| 113 | 115 |
| 114 scrollbar_layer_id_ = -1; | 116 scrollbar_layer_id_ = -1; |
| 115 | 117 |
| 116 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN); | 118 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN); |
| 117 | 119 |
| 118 LayerTreeHost::InitParams params; | 120 LayerTreeHost::InitParams params; |
| 119 params.client = &fake_client_; | 121 params.client = &fake_client_; |
| 120 params.settings = &layer_tree_settings_; | 122 params.settings = &layer_tree_settings_; |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1171 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 1170 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1172 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 1171 | 1173 |
| 1172 // Horizontal Scrollbars. | 1174 // Horizontal Scrollbars. |
| 1173 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1175 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 1174 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1176 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 1175 } | 1177 } |
| 1176 | 1178 |
| 1177 } // namespace | 1179 } // namespace |
| 1178 } // namespace cc | 1180 } // namespace cc |
| OLD | NEW |