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

Unified Diff: chrome/browser/android/vr_shell/ui_elements_unittest.cc

Issue 2705293002: Chrome VR clang-format cleanup (Closed)
Patch Set: Rebase to ToT. Created 3 years, 10 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 | « chrome/browser/android/vr_shell/ui_elements.cc ('k') | chrome/browser/android/vr_shell/ui_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_elements_unittest.cc
diff --git a/chrome/browser/android/vr_shell/ui_elements_unittest.cc b/chrome/browser/android/vr_shell/ui_elements_unittest.cc
index a06907f740b2cecffa59ad361816443911e21205..83183dc589fbf1b4de57d629c0ee6277c3a117a6 100644
--- a/chrome/browser/android/vr_shell/ui_elements_unittest.cc
+++ b/chrome/browser/android/vr_shell/ui_elements_unittest.cc
@@ -12,20 +12,20 @@
#include "testing/gtest/include/gtest/gtest.h"
#define EXPECT_VEC3F_EQ(a, b) \
- EXPECT_FLOAT_EQ(a.x, b.x); \
- EXPECT_FLOAT_EQ(a.y, b.y); \
+ EXPECT_FLOAT_EQ(a.x, b.x); \
+ EXPECT_FLOAT_EQ(a.y, b.y); \
EXPECT_FLOAT_EQ(a.z, b.z);
-#define EXPECT_RECTF_EQ(a, b) \
- EXPECT_FLOAT_EQ(a.x, b.x); \
- EXPECT_FLOAT_EQ(a.y, b.y); \
+#define EXPECT_RECTF_EQ(a, b) \
+ EXPECT_FLOAT_EQ(a.x, b.x); \
+ EXPECT_FLOAT_EQ(a.y, b.y); \
EXPECT_FLOAT_EQ(a.width, b.width); \
EXPECT_FLOAT_EQ(a.height, b.height);
#define EXPECT_ROTATION(a, b) \
- EXPECT_FLOAT_EQ(a.x, b.x); \
- EXPECT_FLOAT_EQ(a.y, b.y); \
- EXPECT_FLOAT_EQ(a.z, b.z); \
+ EXPECT_FLOAT_EQ(a.x, b.x); \
+ EXPECT_FLOAT_EQ(a.y, b.y); \
+ EXPECT_FLOAT_EQ(a.z, b.z); \
EXPECT_FLOAT_EQ(a.angle, b.angle);
namespace vr_shell {
@@ -33,10 +33,10 @@ namespace vr_shell {
TEST(UiElements, AnimateCopyRect) {
ContentRectangle rect;
rect.copy_rect = {10, 100, 1000, 10000};
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::COPYRECT,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {}, {20, 200, 2000, 20000}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::COPYRECT,
+ std::unique_ptr<easing::Easing>(new easing::Linear()), {},
+ {20, 200, 2000, 20000}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(50000);
EXPECT_RECTF_EQ(rect.copy_rect, Rectf({10, 100, 1000, 10000}));
@@ -47,10 +47,10 @@ TEST(UiElements, AnimateCopyRect) {
TEST(UiElements, AnimateSize) {
ContentRectangle rect;
rect.size = {10, 100};
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::SIZE,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {}, {20, 200}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::SIZE,
+ std::unique_ptr<easing::Easing>(new easing::Linear()), {},
+ {20, 200}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(50000);
EXPECT_VEC3F_EQ(rect.size, gvr::Vec3f({10, 100}));
@@ -61,10 +61,10 @@ TEST(UiElements, AnimateSize) {
TEST(UiElements, AnimateTranslation) {
ContentRectangle rect;
rect.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}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::TRANSLATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()), {},
+ {20, 200, 2000}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(50000);
EXPECT_VEC3F_EQ(rect.translation, gvr::Vec3f({10, 100, 1000}));
@@ -75,10 +75,10 @@ TEST(UiElements, AnimateTranslation) {
TEST(UiElements, AnimateRotation) {
ContentRectangle rect;
rect.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}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::ROTATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()), {},
+ {20, 200, 2000, 20000}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(50000);
EXPECT_ROTATION(rect.rotation, RotationAxisAngle({10, 100, 1000, 10000}));
@@ -88,10 +88,10 @@ TEST(UiElements, AnimateRotation) {
TEST(UiElements, AnimationHasNoEffectBeforeScheduledStart) {
ContentRectangle rect;
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::TRANSLATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(49999);
EXPECT_VEC3F_EQ(rect.translation, gvr::Vec3f({0, 0, 0}));
@@ -99,10 +99,10 @@ TEST(UiElements, AnimationHasNoEffectBeforeScheduledStart) {
TEST(UiElements, AnimationPurgedWhenDone) {
ContentRectangle rect;
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::TRANSLATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(60000);
EXPECT_EQ(0u, rect.animations.size());
@@ -110,10 +110,10 @@ TEST(UiElements, AnimationPurgedWhenDone) {
TEST(UiElements, AnimationLinearEasing) {
ContentRectangle rect;
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::TRANSLATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(50000);
EXPECT_VEC3F_EQ(rect.translation, gvr::Vec3f({10, 100, 1000}));
@@ -125,10 +125,10 @@ TEST(UiElements, AnimationLinearEasing) {
TEST(UiElements, AnimationStartFromSpecifiedLocation) {
ContentRectangle rect;
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::TRANSLATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()),
+ {10, 100, 1000}, {20, 200, 2000}, 50000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.Animate(50000);
EXPECT_VEC3F_EQ(rect.translation, gvr::Vec3f({10, 100, 1000}));
@@ -143,14 +143,14 @@ TEST(UiElements, AnimationStartFromSpecifiedLocation) {
// Result: 0 ... 10 ... 30 ... 50
TEST(UiElements, AnimationOverlap) {
ContentRectangle rect;
- std::unique_ptr<Animation> animation(new Animation(
- 0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {}, {20, 200, 2000}, 50000, 10000));
- std::unique_ptr<Animation> animation2(new Animation(
- 0, Animation::Property::TRANSLATION,
- std::unique_ptr<easing::Easing>(new easing::Linear()),
- {}, {50, 500, 5000}, 55000, 10000));
+ std::unique_ptr<Animation> animation(
+ new Animation(0, Animation::Property::TRANSLATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()), {},
+ {20, 200, 2000}, 50000, 10000));
+ std::unique_ptr<Animation> animation2(
+ new Animation(0, Animation::Property::TRANSLATION,
+ std::unique_ptr<easing::Easing>(new easing::Linear()), {},
+ {50, 500, 5000}, 55000, 10000));
rect.animations.emplace_back(std::move(animation));
rect.animations.emplace_back(std::move(animation2));
rect.Animate(55000);
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements.cc ('k') | chrome/browser/android/vr_shell/ui_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698