#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 { … };
}
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)
TEST(WindowSizerTestCommon,
PersistedWindowOffscreenWithNonAggressiveRepositioning) { … }
#endif
TEST(WindowSizerTestCommon, AdjustFitSize) { … }
#endif