chromium/third_party/blink/renderer/core/page/validation_message_overlay_delegate_test.cc

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

#include "third_party/blink/renderer/core/page/validation_message_overlay_delegate.h"

#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/animation/animation.h"
#include "third_party/blink/renderer/core/animation/document_animations.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/page/validation_message_client.h"
#include "third_party/blink/renderer/core/page/validation_message_client_impl.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"
#include "third_party/blink/renderer/platform/web_test_support.h"

#if BUILDFLAG(IS_WIN)
#include "base/strings/utf_string_conversions.h"
#include "third_party/blink/public/web/win/web_font_rendering.h"
#endif

namespace blink {

class ValidationMessageOverlayDelegateTest : public PaintTestConfigurations,
                                             public RenderingTest {};

INSTANTIATE_PAINT_TEST_SUITE_P();

// Regression test for https://crbug.com/990680, where we accidentally
// composited the animations created by ValidationMessageOverlayDelegate. Since
// overlays operate in a Page that has no compositor, the animations broke.
TEST_P(ValidationMessageOverlayDelegateTest,
       OverlayAnimationsShouldNotBeComposited) {}

// Regression test for https://crbug.com/990680, where we found we were not
// properly advancing the AnimationClock in the internal Page created by
// ValidationMessageOverlayDelegate. When combined with the fix for
// https://crbug.com/785940, this caused Animations to never be updated.
TEST_P(ValidationMessageOverlayDelegateTest,
       DelegatesInternalPageShouldHaveAnimationTimesUpdated) {}

TEST_P(ValidationMessageOverlayDelegateTest, Repaint) {}

}  // namespace blink