chromium/ui/views/animation/ink_drop_ripple_unittest.cc

// Copyright 2015 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/views/animation/ink_drop_ripple.h"

#include <memory>

#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/animation/animation.h"
#include "ui/gfx/animation/animation_test_api.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/size.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
#include "ui/views/animation/ink_drop_ripple_observer.h"
#include "ui/views/animation/ink_drop_state.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
#include "ui/views/animation/test/flood_fill_ink_drop_ripple_test_api.h"
#include "ui/views/animation/test/ink_drop_ripple_test_api.h"
#include "ui/views/animation/test/square_ink_drop_ripple_test_api.h"
#include "ui/views/animation/test/test_ink_drop_ripple_observer.h"

namespace views::test {

const float kVisibleOpacity =;

// Represents all the derivatives of the InkDropRipple class. To be used with
// the InkDropRippleTest fixture to test all derviatives.
enum InkDropRippleTestTypes {};

// Test fixture for all InkDropRipple class derivatives.
//
// To add a new derivative:
//    1. Add a value to the InkDropRippleTestTypes enum.
//    2. Implement set up and tear down code for the new enum value in
//       InkDropRippleTest() and
//      ~InkDropRippleTest().
//    3. Add the new enum value to the INSTANTIATE_TEST_SUITE_P) Values list.
class InkDropRippleTest
    : public testing::TestWithParam<InkDropRippleTestTypes> {};

InkDropRippleTest::InkDropRippleTest()
    :{}

InkDropRippleTest::~InkDropRippleTest() {}

// Note: First argument is optional and intentionally left blank.
// (it's a prefix for the generated test cases)
INSTANTIATE_TEST_SUITE_P();

TEST_P(InkDropRippleTest, InitialStateAfterConstruction) {}

// Verify no animations are used when animating from HIDDEN to HIDDEN.
TEST_P(InkDropRippleTest, AnimateToHiddenFromInvisibleState) {}

TEST_P(InkDropRippleTest, AnimateToHiddenFromVisibleState) {}

TEST_P(InkDropRippleTest, ActionPendingOpacity) {}

TEST_P(InkDropRippleTest, QuickActionOpacity) {}

TEST_P(InkDropRippleTest, SlowActionPendingOpacity) {}

TEST_P(InkDropRippleTest, SlowActionOpacity) {}

TEST_P(InkDropRippleTest, ActivatedOpacity) {}

TEST_P(InkDropRippleTest, DeactivatedOpacity) {}

// Verify animations are aborted during deletion and the
// InkDropRippleObservers are notified.
TEST_P(InkDropRippleTest, AnimationsAbortedDuringDeletion) {}

TEST_P(InkDropRippleTest, VerifyObserversAreNotified) {}

TEST_P(InkDropRippleTest, VerifyObserversAreNotifiedOfSuccessfulAnimations) {}

TEST_P(InkDropRippleTest, VerifyObserversAreNotifiedOfPreemptedAnimations) {}

TEST_P(InkDropRippleTest, InkDropStatesPersistWhenCallingAnimateToState) {}

TEST_P(InkDropRippleTest, SnapToHiddenWithoutActiveAnimations) {}

// Verifies all active animations are aborted and the InkDropState is set to
// HIDDEN after invoking SnapToHidden().
TEST_P(InkDropRippleTest, SnapToHiddenWithActiveAnimations) {}

TEST_P(InkDropRippleTest, SnapToActivatedWithoutActiveAnimations) {}

// Verifies all active animations are aborted and the InkDropState is set to
// ACTIVATED after invoking SnapToActivated().
TEST_P(InkDropRippleTest, SnapToActivatedWithActiveAnimations) {}

TEST_P(InkDropRippleTest, AnimateToVisibleFromHidden) {}

// Verifies that the value of InkDropRipple::target_ink_drop_state() returns
// the most recent value passed to AnimateToState() when notifying observers
// that an animation has started within the AnimateToState() function call.
TEST_P(InkDropRippleTest, TargetInkDropStateOnAnimationStarted) {}

// Verifies that the value of InkDropRipple::target_ink_drop_state() returns
// the most recent value passed to AnimateToState() when notifying observers
// that an animation has ended within the AnimateToState() function call.
TEST_P(InkDropRippleTest, TargetInkDropStateOnAnimationEnded) {}

// Verifies that when an we ink drop transitions from ACTION_PENDING to
// ACTIVATED state, animation observers are called in order.
TEST_P(InkDropRippleTest, RipplePendingToActivatedObserverOrder) {}

}  // namespace views::test