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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1700653002: CC Animation: Expose TargetProperty enum to be aliased in Blink Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 9 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 9385 matching lines...) Expand 10 before | Expand all | Expand 10 after
9396 host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50)).thread); 9396 host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50)).thread);
9397 9397
9398 LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer(); 9398 LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer();
9399 9399
9400 begin_frame_args.frame_time = start_time; 9400 begin_frame_args.frame_time = start_time;
9401 host_impl_->WillBeginImplFrame(begin_frame_args); 9401 host_impl_->WillBeginImplFrame(begin_frame_args);
9402 host_impl_->Animate(); 9402 host_impl_->Animate();
9403 host_impl_->UpdateAnimationState(true); 9403 host_impl_->UpdateAnimationState(true);
9404 9404
9405 EXPECT_TRUE(host_impl_->animation_host()->HasAnyAnimationTargetingProperty( 9405 EXPECT_TRUE(host_impl_->animation_host()->HasAnyAnimationTargetingProperty(
9406 scrolling_layer->id(), Animation::SCROLL_OFFSET)); 9406 scrolling_layer->id(), TargetProperty::SCROLL_OFFSET));
9407 9407
9408 EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset()); 9408 EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
9409 host_impl_->DidFinishImplFrame(); 9409 host_impl_->DidFinishImplFrame();
9410 9410
9411 begin_frame_args.frame_time = 9411 begin_frame_args.frame_time =
9412 start_time + base::TimeDelta::FromMilliseconds(50); 9412 start_time + base::TimeDelta::FromMilliseconds(50);
9413 host_impl_->WillBeginImplFrame(begin_frame_args); 9413 host_impl_->WillBeginImplFrame(begin_frame_args);
9414 host_impl_->Animate(); 9414 host_impl_->Animate();
9415 host_impl_->UpdateAnimationState(true); 9415 host_impl_->UpdateAnimationState(true);
9416 9416
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
10134 // There should not be any jitter measured till we hit the fixed point hits 10134 // There should not be any jitter measured till we hit the fixed point hits
10135 // threshold. 10135 // threshold.
10136 float expected_jitter = 10136 float expected_jitter =
10137 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; 10137 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0;
10138 EXPECT_EQ(jitter, expected_jitter); 10138 EXPECT_EQ(jitter, expected_jitter);
10139 } 10139 }
10140 } 10140 }
10141 10141
10142 } // namespace 10142 } // namespace
10143 } // namespace cc 10143 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698