Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1163 LayerTreeHostImplClient* client, | 1163 LayerTreeHostImplClient* client, |
| 1164 Proxy* proxy, | 1164 Proxy* proxy, |
| 1165 RenderingStatsInstrumentation* rendering_stats_instrumentation) | 1165 RenderingStatsInstrumentation* rendering_stats_instrumentation) |
| 1166 : LayerTreeHostImpl(settings, | 1166 : LayerTreeHostImpl(settings, |
| 1167 client, | 1167 client, |
| 1168 proxy, | 1168 proxy, |
| 1169 rendering_stats_instrumentation, | 1169 rendering_stats_instrumentation, |
| 1170 NULL, | 1170 NULL, |
| 1171 0) {} | 1171 0) {} |
| 1172 | 1172 |
| 1173 virtual base::TimeTicks CurrentPhysicalTimeTicks() const OVERRIDE { | |
| 1174 return fake_current_physical_time_; | |
| 1175 } | |
| 1176 | |
| 1177 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { | 1173 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_now) { |
| 1178 fake_current_physical_time_ = fake_now; | 1174 OverrideCurrentFrameTime(fake_now); |
|
danakj
2014/03/11 18:32:36
Just make the tests call this directly?
| |
| 1179 } | 1175 } |
| 1180 | 1176 |
| 1181 private: | 1177 private: |
| 1182 base::TimeTicks fake_current_physical_time_; | 1178 base::TimeTicks fake_current_physical_time_; |
| 1183 }; | 1179 }; |
| 1184 | 1180 |
| 1185 TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) { | 1181 TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) { |
| 1186 LayerTreeSettings settings; | 1182 LayerTreeSettings settings; |
| 1187 settings.scrollbar_animator = LayerTreeSettings::LinearFade; | 1183 settings.scrollbar_animator = LayerTreeSettings::LinearFade; |
| 1188 settings.scrollbar_linear_fade_delay_ms = 20; | 1184 settings.scrollbar_linear_fade_delay_ms = 20; |
| (...skipping 4990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6179 EXPECT_EQ(host_impl_->global_tile_state().hard_memory_limit_in_bytes, | 6175 EXPECT_EQ(host_impl_->global_tile_state().hard_memory_limit_in_bytes, |
| 6180 300u * 1024u * 1024u); | 6176 300u * 1024u * 1024u); |
| 6181 EXPECT_EQ(host_impl_->global_tile_state().soft_memory_limit_in_bytes, | 6177 EXPECT_EQ(host_impl_->global_tile_state().soft_memory_limit_in_bytes, |
| 6182 150u * 1024u * 1024u); | 6178 150u * 1024u * 1024u); |
| 6183 EXPECT_EQ(host_impl_->global_tile_state().unused_memory_limit_in_bytes, | 6179 EXPECT_EQ(host_impl_->global_tile_state().unused_memory_limit_in_bytes, |
| 6184 75u * 1024u * 1024u); | 6180 75u * 1024u * 1024u); |
| 6185 } | 6181 } |
| 6186 | 6182 |
| 6187 } // namespace | 6183 } // namespace |
| 6188 } // namespace cc | 6184 } // namespace cc |
| OLD | NEW |