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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5793 matching lines...) Expand 10 before | Expand all | Expand 10 after
5804 host_impl_.get(), 5804 host_impl_.get(),
5805 &set_needs_commit_count, 5805 &set_needs_commit_count,
5806 &set_needs_redraw_count)); 5806 &set_needs_redraw_count));
5807 // Empty damage rect won't signal the monitor. 5807 // Empty damage rect won't signal the monitor.
5808 host_impl_->SetNeedsRedrawRect(gfx::Rect()); 5808 host_impl_->SetNeedsRedrawRect(gfx::Rect());
5809 EXPECT_EQ(0, set_needs_commit_count); 5809 EXPECT_EQ(0, set_needs_commit_count);
5810 EXPECT_EQ(2, set_needs_redraw_count); 5810 EXPECT_EQ(2, set_needs_redraw_count);
5811 } 5811 }
5812 } 5812 }
5813 5813
5814 class LayerTreeHostImplWithTopControlsTest : public LayerTreeHostImplTest {
5815 public:
5816 virtual void SetUp() OVERRIDE {
5817 LayerTreeSettings settings = DefaultSettings();
5818 settings.calculate_top_controls_position = true;
5819 CreateHostImpl(settings, CreateOutputSurface());
5820 }
5821 };
5822
5823 TEST_F(LayerTreeHostImplWithTopControlsTest, NoIdleAnimations) {
5824 SetupScrollAndContentsLayers(gfx::Size(100, 100))
5825 ->SetScrollOffset(gfx::Vector2d(0, 10));
5826 host_impl_->Animate(base::TimeTicks(), base::Time());
5827 EXPECT_FALSE(did_request_redraw_);
5828 }
5829
5814 } // namespace 5830 } // namespace
5815 } // namespace cc 5831 } // namespace cc
OLDNEW
« 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