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

Unified Diff: ui/compositor/layer_animation_element_unittest.cc

Issue 2550933002: Make all LayerAnimationElement::Create*Element return unique_ptr (Closed)
Patch Set: Complete inclusion Created 4 years 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
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 7d21939ee605cadd54d5f1197f5fe11d09298a56..93714e505e848fd9a846e79cc8808388fd96180b 100644
--- a/ui/compositor/layer_animation_element_unittest.cc
+++ b/ui/compositor/layer_animation_element_unittest.cc
@@ -62,8 +62,8 @@ TEST(LayerAnimationElementTest, TransformElement) {
base::TimeTicks effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateTransformElement(target_transform, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateTransformElement(target_transform, delta);
element->set_animation_group_id(1);
for (int i = 0; i < 2; ++i) {
@@ -108,8 +108,8 @@ TEST(LayerAnimationElementTest, BoundsElement) {
base::TimeTicks start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateBoundsElement(target, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateBoundsElement(target, delta);
for (int i = 0; i < 2; ++i) {
start_time += delta;
@@ -144,8 +144,8 @@ TEST(LayerAnimationElementTest, OpacityElement) {
base::TimeTicks start_time;
base::TimeTicks effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateOpacityElement(target, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateOpacityElement(target, delta);
for (int i = 0; i < 2; ++i) {
start_time = effective_start_time + delta;
@@ -184,8 +184,8 @@ TEST(LayerAnimationElementTest, VisibilityElement) {
bool target = false;
base::TimeTicks start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateVisibilityElement(target, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateVisibilityElement(target, delta);
for (int i = 0; i < 2; ++i) {
start_time += delta;
@@ -219,8 +219,8 @@ TEST(LayerAnimationElementTest, BrightnessElement) {
float target = 1.0;
base::TimeTicks start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateBrightnessElement(target, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateBrightnessElement(target, delta);
for (int i = 0; i < 2; ++i) {
start_time += delta;
@@ -254,8 +254,8 @@ TEST(LayerAnimationElementTest, GrayscaleElement) {
float target = 1.0;
base::TimeTicks start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateGrayscaleElement(target, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateGrayscaleElement(target, delta);
for (int i = 0; i < 2; ++i) {
start_time += delta;
@@ -291,8 +291,8 @@ TEST(LayerAnimationElementTest, PauseElement) {
base::TimeTicks start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreatePauseElement(properties, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreatePauseElement(properties, delta);
TestLayerAnimationDelegate delegate;
TestLayerAnimationDelegate copy = delegate;
@@ -330,8 +330,8 @@ TEST(LayerAnimationElementTest, AbortOpacityElement) {
base::TimeTicks start_time;
base::TimeTicks effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateOpacityElement(target, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateOpacityElement(target, delta);
// Choose a non-linear Tween type.
gfx::Tween::Type tween_type = gfx::Tween::EASE_IN;
@@ -369,8 +369,8 @@ TEST(LayerAnimationElementTest, AbortTransformElement) {
base::TimeTicks start_time;
base::TimeTicks effective_start_time;
base::TimeDelta delta = base::TimeDelta::FromSeconds(1);
- std::unique_ptr<LayerAnimationElement> element(
- LayerAnimationElement::CreateTransformElement(target_transform, delta));
+ std::unique_ptr<LayerAnimationElement> element =
+ LayerAnimationElement::CreateTransformElement(target_transform, delta);
// Choose a non-linear Tween type.
gfx::Tween::Type tween_type = gfx::Tween::EASE_IN;

Powered by Google App Engine
This is Rietveld 408576698