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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 167013003: cc: Don't schedule top controls animation when there isn't one (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mismatch smismatch Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 56eaecca4e2da74f1d308098af38db97d10f5803..3dbd394cb17484a597f89b7421e84359ec630fa6 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -5811,5 +5811,21 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
}
}
+class LayerTreeHostImplWithTopControlsTest : public LayerTreeHostImplTest {
+ public:
+ virtual void SetUp() OVERRIDE {
+ LayerTreeSettings settings = DefaultSettings();
+ settings.calculate_top_controls_position = true;
+ CreateHostImpl(settings, CreateOutputSurface());
+ }
+};
+
+TEST_F(LayerTreeHostImplWithTopControlsTest, NoIdleAnimations) {
+ SetupScrollAndContentsLayers(gfx::Size(100, 100))
+ ->SetScrollOffset(gfx::Vector2d(0, 10));
+ host_impl_->Animate(base::TimeTicks(), base::Time());
+ EXPECT_FALSE(did_request_redraw_);
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698