chromium/chrome/browser/ui/views/tabs/tab_strip_layout_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 "chrome/browser/ui/views/tabs/tab_strip_layout.h"

#include <stddef.h>
#include <string>

#include "base/strings/string_number_conversions.h"
#include "chrome/browser/ui/tabs/tab_types.h"
#include "chrome/browser/ui/views/tabs/tab_layout_state.h"
#include "chrome/browser/ui/views/tabs/tab_width_constraints.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/rect.h"

namespace {

// Returns a string with the width of each gfx::Rect in |tab_bounds|, separated
// by spaces.
std::string TabWidthsAsString(const std::vector<gfx::Rect>& tab_bounds) {}

// Returns a string with the x-coordinate of each gfx::Rect in |tab_bounds|,
// separated by spaces.
std::string TabXPositionsAsString(const std::vector<gfx::Rect>& tab_bounds) {}

struct TestCase {};

constexpr int kStandardWidth =;
constexpr int kTabHeight =;
constexpr int kMinActiveWidth =;
constexpr int kMinInactiveWidth =;
constexpr int kPinnedWidth =;
constexpr int kTabOverlap =;

std::vector<gfx::Rect> CalculateTabBounds(TestCase test_case) {}

}  // namespace

// These tests verify that layout behaves correctly in various situations. In
// particular we want layout to adhere to the following constraints:
// * Tabs are the standard size given by TabSizeInfo when there's room.
// * Tabs are never smaller than the minimum sizes given by TabSizeInfo, even if
//   there isn't enough room.
// * Pinned tabs are always the width given by TabSizeInfo.
// * Remainder pixels (leftover when the available width is distributed evenly)
//   are distributed from left to right.
// * And otherwise tabs shrink to fit the available width.

TEST(TabStripLayoutTest, Basics) {}

TEST(TabStripLayoutTest, AllPinnedTabs) {}

TEST(TabStripLayoutTest, MixedPinnedAndNormalTabs) {}

TEST(TabStripLayoutTest, MiddleWidth) {}

TEST(TabStripLayoutTest, MiddleWidthAndPinnedTab) {}

TEST(TabStripLayoutTest, MiddleWidthRounded) {}

TEST(TabStripLayoutTest, MiddleWidthRoundedAndPinnedTab) {}

TEST(TabStripLayoutTest, BelowMinActiveWidthOneTab) {}

TEST(TabStripLayoutTest, BelowMinActiveWidth) {}

TEST(TabStripLayoutTest, BelowMinActiveWidthRounded) {}

TEST(TabStripLayoutTest, BelowMinActiveWidthActivePinnedTab) {}

TEST(TabStripLayoutTest, BelowMinActiveWidthInactivePinnedTab) {}

TEST(TabStripLayoutTest, BelowMinActiveWidthActivePinnedTabRounded) {}

TEST(TabStripLayoutTest, NotEnoughSpace) {}

TEST(TabStripLayoutTest, NotEnoughSpaceAllPinnedTabs) {}

TEST(TabStripLayoutTest, NotEnoughSpaceMixedPinnedAndNormalTabs) {}

TEST(TabStripLayoutTest, ExactlyEnoughSpaceAllPinnedTabs) {}