chromium/ui/gfx/geometry/transform_operations_unittest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/gfx/geometry/transform_operations.h"

#include <stddef.h>

#include <algorithm>
#include <limits>
#include <utility>
#include <vector>

#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/geometry/box_f.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/test/geometry_util.h"
#include "ui/gfx/geometry/vector3d_f.h"

namespace gfx {
namespace {

void ExpectTransformOperationEqual(const TransformOperation& lhs,
                                   const TransformOperation& rhs) {}

TEST(TransformOperationTest, TransformTypesAreUnique) {}

TEST(TransformOperationTest, MatchingPrefixSameLength) {}

TEST(TransformOperationTest, MatchingPrefixDifferentLength) {}

std::vector<std::unique_ptr<TransformOperations>> GetIdentityOperations() {}

TEST(TransformOperationTest, MatchingPrefixLengthOrder) {}

TEST(TransformOperationTest, NoneAlwaysMatches) {}

TEST(TransformOperationTest, ApplyTranslate) {}

TEST(TransformOperationTest, ApplyRotate) {}

TEST(TransformOperationTest, ApplyScale) {}

TEST(TransformOperationTest, ApplySkew) {}

TEST(TransformOperationTest, ApplyPerspective) {}

TEST(TransformOperationTest, ApplyMatrix) {}

TEST(TransformOperationTest, ApplyOrder) {}

TEST(TransformOperationTest, BlendOrder) {}

static void CheckProgress(SkScalar progress,
                          const gfx::Transform& from_matrix,
                          const gfx::Transform& to_matrix,
                          const TransformOperations& from_transform,
                          const TransformOperations& to_transform) {}

TEST(TransformOperationTest, BlendProgress) {}

TEST(TransformOperationTest, BlendWhenTypesDoNotMatch) {}

TEST(TransformOperationTest, LargeRotationsWithSameAxis) {}

TEST(TransformOperationTest, LargeRotationsWithSameAxisInDifferentDirection) {}

TEST(TransformOperationTest, LargeRotationsWithDifferentAxes) {}

TEST(TransformOperationTest, RotationFromZeroDegDifferentAxes) {}

TEST(TransformOperationTest, RotationFromZeroDegSameAxes) {}

TEST(TransformOperationTest, RotationToZeroDegDifferentAxes) {}

TEST(TransformOperationTest, RotationToZeroDegSameAxes) {}

TEST(TransformOperationTest, BlendRotationFromIdentity) {}

TEST(TransformOperationTest, BlendTranslationFromIdentity) {}

TEST(TransformOperationTest, BlendScaleFromIdentity) {}

TEST(TransformOperationTest, BlendSkewFromEmpty) {}

TEST(TransformOperationTest, BlendPerspectiveFromIdentity) {}

TEST(TransformOperationTest, BlendRotationToIdentity) {}

TEST(TransformOperationTest, BlendTranslationToIdentity) {}

TEST(TransformOperationTest, BlendScaleToIdentity) {}

TEST(TransformOperationTest, BlendSkewToEmpty) {}

TEST(TransformOperationTest, BlendPerspectiveToIdentity) {}

TEST(TransformOperationTest, ExtrapolatePerspectiveBlending) {}

TEST(TransformOperationTest, ExtrapolateMatrixBlending) {}

TEST(TransformOperationTest, NonDecomposableBlend) {}

TEST(TransformOperationTest, BlendedBoundsWhenTypesDoNotMatch) {}

TEST(TransformOperationTest, BlendedBoundsForIdentity) {}

TEST(TransformOperationTest, BlendedBoundsForTranslate) {}

TEST(TransformOperationTest, BlendedBoundsForScale) {}

TEST(TransformOperationTest, BlendedBoundsWithZeroScale) {}

TEST(TransformOperationTest, BlendedBoundsForRotationTrivial) {}

TEST(TransformOperationTest, BlendedBoundsForRotationAllExtrema) {}

TEST(TransformOperationTest, BlendedBoundsForRotationDifferentAxes) {}

TEST(TransformOperationTest, BlendedBoundsForRotationPointOnAxis) {}

TEST(TransformOperationTest, BlendedBoundsForRotationProblematicAxes) {}

static void ExpectBoxesApproximatelyEqual(const gfx::BoxF& lhs,
                                          const gfx::BoxF& rhs,
                                          float tolerance) {}

static void EmpiricallyTestBounds(const TransformOperations& from,
                                  const TransformOperations& to,
                                  SkScalar min_progress,
                                  SkScalar max_progress,
                                  bool test_containment_only) {}

static void EmpiricallyTestBoundsEquality(const TransformOperations& from,
                                          const TransformOperations& to,
                                          SkScalar min_progress,
                                          SkScalar max_progress) {}

static void EmpiricallyTestBoundsContainment(const TransformOperations& from,
                                             const TransformOperations& to,
                                             SkScalar min_progress,
                                             SkScalar max_progress) {}

TEST(TransformOperationTest, BlendedBoundsForRotationEmpiricalTests) {}

TEST(TransformOperationTest, PerspectiveMatrixAndTransformBlendingEquivalency) {}

TEST(TransformOperationTest, BlendedBoundsForPerspective) {}

TEST(TransformOperationTest, BlendedBoundsForSkew) {}

TEST(TransformOperationTest, NonCommutativeRotations) {}

TEST(TransformOperationTest, BlendedBoundsForSequence) {}

TEST(TransformOperationTest, IsTranslationWithSingleOperation) {}

TEST(TransformOperationTest, IsTranslationWithMultipleOperations) {}

TEST(TransformOperationTest, ScaleComponent) {}

TEST(TransformOperationsTest, ApproximateEquality) {}

}  // namespace

// This test is intentionally outside the anonymous namespace for visibility as
// it needs to be friend of TransformOperations.
TEST(TransformOperationsTest, TestDecompositionCache) {}

TEST(TransformOperationTest, BlendSkewMismatch) {}

TEST(TransformOperationTest, BlendSkewMatch) {}

TEST(TransformOperationsTest, Rotate360IsNotIdentityOperation) {}

}  // namespace gfx