chromium/third_party/blink/renderer/core/testing/core_unit_test_helper.h

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

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TESTING_CORE_UNIT_TEST_HELPER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_TESTING_CORE_UNIT_TEST_HELPER_H_

#include <gtest/gtest.h>
#include <memory>

#include "cc/layers/layer.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/layout/geometry/logical_rect.h"
#include "third_party/blink/renderer/core/layout/geometry/physical_rect.h"
#include "third_party/blink/renderer/core/layout/hit_test_result.h"
#include "third_party/blink/renderer/core/layout/inline/inline_node.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/loader/empty_clients.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/platform/testing/layer_tree_host_embedder.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"

namespace blink {

class PaintLayer;

class SingleChildLocalFrameClient final : public EmptyLocalFrameClient {};

class LocalFrameClientWithParent final : public EmptyLocalFrameClient {};

// RenderingTestChromeClient ensures that we have a LayerTreeHost which allows
// testing property tree creation.
class RenderingTestChromeClient : public EmptyChromeClient {};

class RenderingTest : public PageTestBase {};

// These constructors are for convenience of tests to construct these geometries
// from integers.
constexpr LogicalOffset::LogicalOffset(int inline_offset, int block_offset)
    :{}
constexpr LogicalSize::LogicalSize(int inline_size, int block_size)
    :{}
constexpr LogicalRect::LogicalRect(int inline_offset,
                                   int block_offset,
                                   int inline_size,
                                   int block_size)
    :{}
constexpr PhysicalOffset::PhysicalOffset(int left, int top)
    :{}
constexpr PhysicalSize::PhysicalSize(int width, int height)
    :{}
constexpr PhysicalRect::PhysicalRect(int left, int top, int width, int height)
    :{}

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_TESTING_CORE_UNIT_TEST_HELPER_H_