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

Side by Side Diff: services/view_manager/animation_runner_unittest.cc

Issue 1408793006: Convert "return local_var.Pass();" to "return local_var;". (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/view_manager/animation_runner.h" 5 #include "services/view_manager/animation_runner.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "mojo/converters/geometry/geometry_type_converters.h" 8 #include "mojo/converters/geometry/geometry_type_converters.h"
9 #include "mojo/services/view_manager/interfaces/view_manager_constants.mojom.h" 9 #include "mojo/services/view_manager/interfaces/view_manager_constants.mojom.h"
10 #include "services/view_manager/animation_runner_observer.h" 10 #include "services/view_manager/animation_runner_observer.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 std::vector<uint32_t> change_ids_; 61 std::vector<uint32_t> change_ids_;
62 std::vector<std::string> changes_; 62 std::vector<std::string> changes_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(TestAnimationRunnerObserver); 64 DISALLOW_COPY_AND_ASSIGN(TestAnimationRunnerObserver);
65 }; 65 };
66 66
67 // Creates an AnimationValuePtr from the specified float value. 67 // Creates an AnimationValuePtr from the specified float value.
68 AnimationValuePtr FloatAnimationValue(float float_value) { 68 AnimationValuePtr FloatAnimationValue(float float_value) {
69 AnimationValuePtr value(AnimationValue::New()); 69 AnimationValuePtr value(AnimationValue::New());
70 value->float_value = float_value; 70 value->float_value = float_value;
71 return value.Pass(); 71 return value;
72 } 72 }
73 73
74 // Creates an AnimationValuePtr from the specified transform. 74 // Creates an AnimationValuePtr from the specified transform.
75 AnimationValuePtr TransformAnimationValue(const gfx::Transform& transform) { 75 AnimationValuePtr TransformAnimationValue(const gfx::Transform& transform) {
76 AnimationValuePtr value(AnimationValue::New()); 76 AnimationValuePtr value(AnimationValue::New());
77 value->transform = Transform::From(transform); 77 value->transform = Transform::From(transform);
78 return value.Pass(); 78 return value;
79 } 79 }
80 80
81 // Adds an AnimationElement to |group|s last sequence with the specified value. 81 // Adds an AnimationElement to |group|s last sequence with the specified value.
82 void AddElement(AnimationGroup* group, 82 void AddElement(AnimationGroup* group,
83 TimeDelta time, 83 TimeDelta time,
84 AnimationValuePtr start_value, 84 AnimationValuePtr start_value,
85 AnimationValuePtr target_value, 85 AnimationValuePtr target_value,
86 AnimationProperty property, 86 AnimationProperty property,
87 AnimationTweenType tween_type) { 87 AnimationTweenType tween_type) {
88 AnimationSequence& sequence = 88 AnimationSequence& sequence =
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 ASSERT_EQ(0u, runner_observer_.changes()->size()); 627 ASSERT_EQ(0u, runner_observer_.changes()->size());
628 628
629 // Animate to end. 629 // Animate to end.
630 runner_.Tick(initial_time_ + TimeDelta::FromMicroseconds(2000)); 630 runner_.Tick(initial_time_ + TimeDelta::FromMicroseconds(2000));
631 ASSERT_EQ(1u, runner_observer_.changes()->size()); 631 ASSERT_EQ(1u, runner_observer_.changes()->size());
632 EXPECT_EQ("done", runner_observer_.changes()->at(0)); 632 EXPECT_EQ("done", runner_observer_.changes()->at(0));
633 EXPECT_EQ(animation_id2, runner_observer_.change_ids()->at(0)); 633 EXPECT_EQ(animation_id2, runner_observer_.change_ids()->at(0));
634 } 634 }
635 635
636 } // namespace view_manager 636 } // namespace view_manager
OLDNEW
« no previous file with comments | « services/url_response_disk_cache/url_response_disk_cache_impl.cc ('k') | services/view_manager/gesture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698