chromium/third_party/blink/renderer/core/layout/exclusions/exclusion_space_test.cc

// Copyright 2016 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/layout/exclusions/exclusion_space.h"

#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"

namespace blink {

namespace {

ElementsAre;

#define TEST_OPPORTUNITY(opp, expected_start_offset, expected_end_offset)

struct ExclusionSpaceForTesting {};

LayoutOpportunity CreateLayoutOpportunity(float inline_start,
                                          float block_start,
                                          float inline_end,
                                          float block_end = LayoutUnit::Max()) {}

// Tests that an empty exclusion space returns exactly one layout opportunity
// each one, and sized appropriately given the area.
TEST(ExclusionSpaceTest, Empty) {}

TEST(ExclusionSpaceTest, SingleExclusion) {}

TEST(ExclusionSpaceTest, TwoExclusions) {}

// Tests the "solid edge" behaviour. When "NEW" is added a new layout
// opportunity shouldn't be created above it.
//
// NOTE: This is the same example given in the code.
//
//    0 1 2 3 4 5 6 7 8
// 0  +---+  X----X+---+
//    |xxx|  .     |xxx|
// 10 |xxx|  .     |xxx|
//    +---+  .     +---+
// 20        .     .
//      +---+. .+---+
// 30   |xxx|   |NEW|
//      |xxx|   +---+
// 40   +---+
TEST(ExclusionSpaceTest, SolidEdges) {}

// Tests that if a new exclusion doesn't overlap with a shelf, we don't add a
// new layout opportunity.
//
// NOTE: This is the same example given in the code.
//
//    0 1 2 3 4 5 6 7 8
// 0  +---+X------X+---+
//    |xxx|        |xxx|
// 10 |xxx|        |xxx|
//    +---+        +---+
// 20
//                  +---+
// 30               |NEW|
//                  +---+
TEST(ExclusionSpaceTest, OverlappingWithShelf) {}

// Tests that a shelf is properly inserted between two other shelves.
//
// Additionally tests that an inserted exclusion is correctly inserted in a
// shelve's line_left_edges/line_right_edges list.
//
// NOTE: This is the same example given in the code.
//
//    0 1 2 3 4 5 6 7 8
// 0  +-----+X----X+---+
//    |xxxxx|      |xxx|
// 10 +-----+      |xxx|
//      +---+      |xxx|
// 20   |NEW|      |xxx|
//    X-----------X|xxx|
// 30              |xxx|
//    X----------------X
TEST(ExclusionSpaceTest, InsertBetweenShelves) {}

TEST(ExclusionSpaceTest, InitialLetterBasic) {}

TEST(ExclusionSpaceTest, InitialLetterDirectionRight) {}

TEST(ExclusionSpaceTest, InitialLetterFloatLeft1) {}

TEST(ExclusionSpaceTest, InitialLetterFloatLeft2) {}

TEST(ExclusionSpaceTest, InitialLetterFloatLeft2ClearLeft) {}

TEST(ExclusionSpaceTest, InitialLetterFloatLeftAndRight) {}

TEST(ExclusionSpaceTest, InitialLetterFloatLeftAfterBreak) {}

TEST(ExclusionSpaceTest, InitialLetterFloatRight2) {}

TEST(ExclusionSpaceTest, ZeroInlineSizeOpportunity) {}

TEST(ExclusionSpaceTest, NegativeInlineSizeOpportunityLeft) {}

TEST(ExclusionSpaceTest, NegativeInlineSizeOpportunityRight) {}

TEST(ExclusionSpaceTest, PreInitialization) {}

TEST(ExclusionSpaceTest, MergeExclusionSpacesNoPreviousExclusions) {}

TEST(ExclusionSpaceTest, MergeExclusionSpacesPreviousExclusions) {}

TEST(ExclusionSpaceTest, MergeExclusionSpacesNoOutputExclusions) {}

}  // namespace
}  // namespace blink