chromium/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc

// Copyright 2012 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/window_sizer/window_sizer_common_unittest.h"

#include <stddef.h>
#include <utility>

#include "base/compiler_specific.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/display/display.h"
#include "ui/display/scoped_display_for_new_windows.h"
#include "ui/display/screen.h"
#include "ui/display/screen_base.h"

#if defined(USE_AURA)
#include "ui/aura/window.h"
#endif

namespace {

class TestScreen : public display::ScreenBase {};

}  // namespace

TestStateProvider::TestStateProvider()
    :{}

void TestStateProvider::SetPersistentState(const gfx::Rect& bounds,
                                           const gfx::Rect& work_area,
                                           ui::WindowShowState show_state) {}

void TestStateProvider::SetLastActiveState(const gfx::Rect& bounds,
                                           ui::WindowShowState show_state) {}

bool TestStateProvider::GetPersistentState(
    gfx::Rect* bounds,
    gfx::Rect* saved_work_area,
    ui::WindowShowState* show_state) const {}

bool TestStateProvider::GetLastActiveWindowState(
    gfx::Rect* bounds,
    ui::WindowShowState* show_state) const {}

WindowSizerTestUtil& WindowSizerTestUtil::WithMonitorBounds(
    const gfx::Rect& monitor1_bounds,
    const gfx::Rect& monitor2_bounds) {}

WindowSizerTestUtil& WindowSizerTestUtil::WithMonitorWorkArea(
    const gfx::Rect& monitor1_work_area) {}

WindowSizerTestUtil& WindowSizerTestUtil::WithLastActiveBounds(
    const gfx::Rect& bounds) {}

WindowSizerTestUtil& WindowSizerTestUtil::WithPersistedBounds(
    const gfx::Rect& bounds) {}

WindowSizerTestUtil& WindowSizerTestUtil::WithPersistedWorkArea(
    const gfx::Rect& work_area) {}

WindowSizerTestUtil& WindowSizerTestUtil::WithSpecifiedBounds(
    const gfx::Rect& bounds) {}

gfx::Rect WindowSizerTestUtil::GetWindowBounds() {}

#if !BUILDFLAG(IS_MAC)

#if !BUILDFLAG(IS_CHROMEOS_ASH)
// Passing null for the browser parameter of GetWindowBounds makes the test skip
// all Ash-specific logic, so there's no point running this on Chrome OS.
TEST(WindowSizerTestCommon,
     PersistedWindowOffscreenWithNonAggressiveRepositioning) {}
#endif  // !BUILDFLAG(IS_CHROMEOS_ASH)

// Test that the window is sized appropriately for the first run experience
// where the default window bounds calculation is invoked.
TEST(WindowSizerTestCommon, AdjustFitSize) {}

#endif  // !BUILDFLAG(IS_MAC)