chromium/extensions/browser/app_window/app_window_geometry_cache_unittest.cc

// 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.

#include "extensions/browser/app_window/app_window_geometry_cache.h"
#include "base/memory/raw_ptr.h"

#include <stddef.h>

#include <memory>
#include <utility>

#include "base/files/file_path.h"
#include "base/strings/string_number_conversions.h"
#include "components/prefs/mock_pref_change_callback.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extensions_test.h"
#include "extensions/browser/unloaded_extension_reason.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/extension_id.h"

namespace extensions {

namespace {
const char kWindowId[] =;
const char kWindowId2[] =;

// Create a very simple extension with id.
scoped_refptr<const Extension> CreateExtension(const ExtensionId& id) {}

}  // namespace

// Base class for tests.
class AppWindowGeometryCacheTest : public ExtensionsTest {};

void AppWindowGeometryCacheTest::SetUp() {}

void AppWindowGeometryCacheTest::TearDown() {}

void AppWindowGeometryCacheTest::AddGeometryAndLoadExtension(
    const ExtensionId& extension_id,
    const std::string& window_id,
    const gfx::Rect& bounds,
    const gfx::Rect& screen_bounds,
    ui::WindowShowState state) {}

void AppWindowGeometryCacheTest::WaitForSync() {}

void AppWindowGeometryCacheTest::LoadExtension(
    const ExtensionId& extension_id) {}

void AppWindowGeometryCacheTest::UnloadExtension(
    const ExtensionId& extension_id) {}

ExtensionId AppWindowGeometryCacheTest::AddExtensionWithPrefs(
    const std::string& name) {}

// Test getting geometry from an empty store.
TEST_F(AppWindowGeometryCacheTest, GetGeometryEmptyStore) {}

// Test getting geometry for an unknown extension.
TEST_F(AppWindowGeometryCacheTest, GetGeometryUnkownExtension) {}

// Test getting geometry for an unknown window in a known extension.
TEST_F(AppWindowGeometryCacheTest, GetGeometryUnkownWindow) {}

// Test that loading geometry, screen_bounds and state from the store works
// correctly.
TEST_F(AppWindowGeometryCacheTest, GetGeometryAndStateFromStore) {}

// Test corrupt bounds will not be loaded.
TEST_F(AppWindowGeometryCacheTest, CorruptBounds) {}

// Test corrupt screen bounds will not be loaded.
TEST_F(AppWindowGeometryCacheTest, CorruptScreenBounds) {}

// Test corrupt state will not be loaded.
TEST_F(AppWindowGeometryCacheTest, CorruptState) {}

// Test saving geometry, screen_bounds and state to the cache and state store,
// and reading it back.
TEST_F(AppWindowGeometryCacheTest, SaveGeometryAndStateToStore) {}

// Tests that we won't do writes to the state store for SaveGeometry calls
// which don't change the state we already have.
TEST_F(AppWindowGeometryCacheTest, NoDuplicateWrites) {}

// Tests that no more than kMaxCachedWindows windows will be cached.
TEST_F(AppWindowGeometryCacheTest, MaxWindows) {}

}  // namespace extensions