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

Unified Diff: chrome/browser/android/vr_shell/ui_elements/ui_element_unittest.cc

Issue 2929483003: VR: Further split common code from Android-specific code. (Closed)
Patch Set: Created 3 years, 6 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
Index: chrome/browser/android/vr_shell/ui_elements/ui_element_unittest.cc
diff --git a/chrome/browser/android/vr_shell/ui_elements/ui_element_unittest.cc b/chrome/browser/android/vr_shell/ui_elements/ui_element_unittest.cc
index 00a583f65955333870a38d4a0e3c598b66227bea..a511cd5669b0c1a8517402b146267bed3510c734 100644
--- a/chrome/browser/android/vr_shell/ui_elements/ui_element_unittest.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/ui_element_unittest.cc
@@ -46,10 +46,10 @@ base::TimeDelta usToDelta(uint64_t us) {
TEST(UiElements, AnimateSize) {
UiElement rect;
rect.set_size({10, 100, 1});
- std::unique_ptr<Animation> animation(
- new Animation(0, Animation::Property::SIZE,
- std::unique_ptr<easing::Easing>(new easing::Linear()), {},
- {20, 200}, usToTicks(50000), usToDelta(10000)));
+ std::unique_ptr<Animation> animation(new Animation(
+ 0, Animation::Property::SIZE,
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ std::vector<float>(), {20, 200}, usToTicks(50000), usToDelta(10000)));
rect.animations().emplace_back(std::move(animation));
rect.Animate(usToTicks(50000));
EXPECT_VEC3F_EQ(gfx::Vector3dF(10, 100, 1), rect.size());
@@ -62,8 +62,9 @@ TEST(UiElements, AnimateTranslation) {
rect.set_translation({10, 100, 1000});
std::unique_ptr<Animation> animation(
new Animation(0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()), {},
- {20, 200, 2000}, usToTicks(50000), usToDelta(10000)));
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ std::vector<float>(), {20, 200, 2000}, usToTicks(50000),
+ usToDelta(10000)));
rect.animations().emplace_back(std::move(animation));
rect.Animate(usToTicks(50000));
EXPECT_VEC3F_EQ(gfx::Vector3dF(10, 100, 1000), rect.translation());
@@ -74,10 +75,11 @@ TEST(UiElements, AnimateTranslation) {
TEST(UiElements, AnimateRotation) {
UiElement rect;
rect.set_rotation({10, 100, 1000, 10000});
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::ROTATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()), {},
- {20, 200, 2000, 20000}, usToTicks(50000), usToDelta(10000)));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::ROTATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ std::vector<float>(), {20, 200, 2000, 20000},
+ usToTicks(50000), usToDelta(10000)));
rect.animations().emplace_back(std::move(animation));
rect.Animate(usToTicks(50000));
EXPECT_ROTATION(vr::RotationAxisAngle({10, 100, 1000, 10000}),
@@ -146,12 +148,14 @@ TEST(UiElements, AnimationOverlap) {
UiElement rect;
std::unique_ptr<Animation> animation(
new Animation(0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()), {},
- {20, 200, 2000}, usToTicks(50000), usToDelta(10000)));
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ std::vector<float>(), {20, 200, 2000}, usToTicks(50000),
+ usToDelta(10000)));
std::unique_ptr<Animation> animation2(
new Animation(0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()), {},
- {50, 500, 5000}, usToTicks(55000), usToDelta(10000)));
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ std::vector<float>(), {50, 500, 5000}, usToTicks(55000),
+ usToDelta(10000)));
rect.animations().emplace_back(std::move(animation));
rect.animations().emplace_back(std::move(animation2));
rect.Animate(usToTicks(55000));
« no previous file with comments | « chrome/browser/android/vr_shell/ui_browser_interface.h ('k') | chrome/browser/android/vr_shell/ui_scene_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698