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

Side by Side Diff: third_party/WebKit/Source/platform/transforms/TransformOperationsTest.cpp

Issue 2391003004: Fix common axes logic to detect negated axes as not common (Closed)
Patch Set: Update expectation Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/RotationTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 toSame.operations().append(RotateTransformOperation::create( 256 toSame.operations().append(RotateTransformOperation::create(
257 1, 1, 1, 390, TransformOperation::Rotate3D)); 257 1, 1, 1, 390, TransformOperation::Rotate3D));
258 toOpposite.operations().append(RotateTransformOperation::create( 258 toOpposite.operations().append(RotateTransformOperation::create(
259 -1, -1, -1, 390, TransformOperation::Rotate3D)); 259 -1, -1, -1, 390, TransformOperation::Rotate3D));
260 toDifferent.operations().append(RotateTransformOperation::create( 260 toDifferent.operations().append(RotateTransformOperation::create(
261 1, 3, 1, 390, TransformOperation::Rotate3D)); 261 1, 3, 1, 390, TransformOperation::Rotate3D));
262 262
263 FloatBox box(1, 0, 0, 0, 0, 0); 263 FloatBox box(1, 0, 0, 0, 0, 0);
264 FloatBox bounds; 264 FloatBox bounds;
265 EXPECT_TRUE(toSame.blendedBoundsForBox(box, fromOps, 0, 1, &bounds)); 265 EXPECT_TRUE(toSame.blendedBoundsForBox(box, fromOps, 0, 1, &bounds));
266 EXPECT_TRUE(toOpposite.blendedBoundsForBox(box, fromOps, 0, 1, &bounds)); 266 EXPECT_FALSE(toOpposite.blendedBoundsForBox(box, fromOps, 0, 1, &bounds));
267 EXPECT_FALSE(toDifferent.blendedBoundsForBox(box, fromOps, 0, 1, &bounds)); 267 EXPECT_FALSE(toDifferent.blendedBoundsForBox(box, fromOps, 0, 1, &bounds));
268 } 268 }
269 269
270 TEST(TransformOperationsTest, AbsoluteAnimatedOnAxisRotationBounds) { 270 TEST(TransformOperationsTest, AbsoluteAnimatedOnAxisRotationBounds) {
271 // If we rotate a point that is on the axis of rotation, the box should not 271 // If we rotate a point that is on the axis of rotation, the box should not
272 // change at all. 272 // change at all.
273 TransformOperations fromOps; 273 TransformOperations fromOps;
274 TransformOperations toOps; 274 TransformOperations toOps;
275 fromOps.operations().append(RotateTransformOperation::create( 275 fromOps.operations().append(RotateTransformOperation::create(
276 1, 1, 1, 30, TransformOperation::Rotate3D)); 276 1, 1, 1, 30, TransformOperation::Rotate3D));
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, 502 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual,
503 FloatBox(-33, -13, 3, 57, 19, 52), bounds); 503 FloatBox(-33, -13, 3, 57, 19, 52), bounds);
504 504
505 EXPECT_TRUE( 505 EXPECT_TRUE(
506 identityOperations.blendedBoundsForBox(box, fromOps, 0, 1, &bounds)); 506 identityOperations.blendedBoundsForBox(box, fromOps, 0, 1, &bounds));
507 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual, 507 EXPECT_PRED_FORMAT2(FloatBoxTest::AssertAlmostEqual,
508 FloatBox(-7, -3, 2, 15, 23, 20), bounds); 508 FloatBox(-7, -3, 2, 15, 23, 20), bounds);
509 } 509 }
510 510
511 } // namespace blink 511 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/RotationTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698