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

Unified Diff: ui/gfx/transform_unittest.cc

Issue 2495703002: Reenable XFormTest.BlendScale on ARM (Closed)
Patch Set: ifdef out invert test Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/transform_unittest.cc
diff --git a/ui/gfx/transform_unittest.cc b/ui/gfx/transform_unittest.cc
index e0b2013ff2d7a3ac1089fb773e593a90793aa39e..8d99b6e69663402095401a7e6aeae2ff44a38c65 100644
--- a/ui/gfx/transform_unittest.cc
+++ b/ui/gfx/transform_unittest.cc
@@ -757,9 +757,8 @@ TEST(XFormTest, CanBlend180DegreeRotation) {
}
}
-#if defined(_WIN64) || defined(ARCH_CPU_ARM_FAMILY)
-// Win: https://crbug.com/406574
-// Arm: https://crbug.com/662558
+#if defined(_WIN64)
+// https://crbug.com/406574
#define MAYBE_BlendScale DISABLED_BlendScale
#else
#define MAYBE_BlendScale BlendScale
@@ -769,11 +768,12 @@ TEST(XFormTest, MAYBE_BlendScale) {
for (int i = -5; i < 15; ++i) {
Transform to;
to.Scale3d(5, 4, 3);
- double t = i / 9.0;
- EXPECT_TRUE(to.Blend(from, t));
- EXPECT_FLOAT_EQ(t * 4 + 1, to.matrix().get(0, 0)) << "i: " << i;
- EXPECT_FLOAT_EQ(t * 3 + 1, to.matrix().get(1, 1)) << "i: " << i;
- EXPECT_FLOAT_EQ(t * 2 + 1, to.matrix().get(2, 2)) << "i: " << i;
+ double s1 = i / 9.0;
+ double s2 = 1 - s1;
+ EXPECT_TRUE(to.Blend(from, s1));
+ EXPECT_FLOAT_EQ(5 * s1 + s2, to.matrix().get(0, 0)) << "i: " << i;
+ EXPECT_FLOAT_EQ(4 * s1 + s2, to.matrix().get(1, 1)) << "i: " << i;
+ EXPECT_FLOAT_EQ(3 * s1 + s2, to.matrix().get(2, 2)) << "i: " << i;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698