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

Unified Diff: ui/compositor/layer_animation_element_unittest.cc

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 2 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 | « ui/compositor/layer_animation_element.cc ('k') | ui/compositor/layer_animation_sequence.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_element_unittest.cc
diff --git a/ui/compositor/layer_animation_element_unittest.cc b/ui/compositor/layer_animation_element_unittest.cc
index 8871a2c9f5efee4c33741bd79e6c792c3de433e1..a9a1f90290ccb28d1907cc16cde45b117e578ad0 100644
--- a/ui/compositor/layer_animation_element_unittest.cc
+++ b/ui/compositor/layer_animation_element_unittest.cc
@@ -13,6 +13,7 @@
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/test/test_layer_animation_delegate.h"
#include "ui/compositor/test/test_utils.h"
+#include "ui/gfx/frame_time.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
@@ -27,8 +28,8 @@ TEST(LayerAnimationElementTest, TransformElement) {
gfx::Transform start_transform, target_transform;
start_transform.Rotate(-30.0);
target_transform.Rotate(30.0);
- base::TimeTicks start_time;
- base::TimeTicks effective_start_time;
+ gfx::FrameTime start_time;
+ gfx::FrameTime effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
@@ -98,7 +99,7 @@ TEST(LayerAnimationElementTest, InverseElementDurationScaled) {
// Ensures that the GetTargetTransform() method works as intended.
TEST(LayerAnimationElementTest, InverseElementTargetCalculation) {
- base::TimeTicks start_time;
+ gfx::FrameTime start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
start_time += delta;
@@ -136,7 +137,7 @@ TEST(LayerAnimationElementTest, BoundsElement) {
start = target = middle = gfx::Rect(0, 0, 50, 50);
start.set_x(-90);
target.set_x(90);
- base::TimeTicks start_time;
+ gfx::FrameTime start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
@@ -172,8 +173,8 @@ TEST(LayerAnimationElementTest, OpacityElement) {
float start = 0.0;
float middle = 0.5;
float target = 1.0;
- base::TimeTicks start_time;
- base::TimeTicks effective_start_time;
+ gfx::FrameTime start_time;
+ gfx::FrameTime effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
LayerAnimationElement::CreateOpacityElement(target, delta));
@@ -213,7 +214,7 @@ TEST(LayerAnimationElementTest, VisibilityElement) {
TestLayerAnimationDelegate delegate;
bool start = true;
bool target = false;
- base::TimeTicks start_time;
+ gfx::FrameTime start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
LayerAnimationElement::CreateVisibilityElement(target, delta));
@@ -248,7 +249,7 @@ TEST(LayerAnimationElementTest, BrightnessElement) {
float start = 0.0;
float middle = 0.5;
float target = 1.0;
- base::TimeTicks start_time;
+ gfx::FrameTime start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
LayerAnimationElement::CreateBrightnessElement(target, delta));
@@ -283,7 +284,7 @@ TEST(LayerAnimationElementTest, GrayscaleElement) {
float start = 0.0;
float middle = 0.5;
float target = 1.0;
- base::TimeTicks start_time;
+ gfx::FrameTime start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
LayerAnimationElement::CreateGrayscaleElement(target, delta));
@@ -320,7 +321,7 @@ TEST(LayerAnimationElementTest, PauseElement) {
properties.insert(LayerAnimationElement::OPACITY);
properties.insert(LayerAnimationElement::BRIGHTNESS);
properties.insert(LayerAnimationElement::GRAYSCALE);
- base::TimeTicks start_time;
+ gfx::FrameTime start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
@@ -359,8 +360,8 @@ TEST(LayerAnimationElementTest, AbortOpacityElement) {
TestLayerAnimationDelegate delegate;
float start = 0.0;
float target = 1.0;
- base::TimeTicks start_time;
- base::TimeTicks effective_start_time;
+ gfx::FrameTime start_time;
+ gfx::FrameTime effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
LayerAnimationElement::CreateOpacityElement(target, delta));
@@ -398,8 +399,8 @@ TEST(LayerAnimationElementTest, AbortTransformElement) {
gfx::Transform start_transform, target_transform;
start_transform.Rotate(-30.0);
target_transform.Rotate(30.0);
- base::TimeTicks start_time;
- base::TimeTicks effective_start_time;
+ gfx::FrameTime start_time;
+ gfx::FrameTime effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
scoped_ptr<LayerAnimationElement> element(
LayerAnimationElement::CreateTransformElement(target_transform, delta));
« no previous file with comments | « ui/compositor/layer_animation_element.cc ('k') | ui/compositor/layer_animation_sequence.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698