chromium/extensions/browser/api/storage/session_storage_manager_unittest.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <memory>

#include "base/containers/contains.h"
#include "base/memory/raw_ptr.h"
#include "base/values.h"
#include "extensions/browser/api/storage/session_storage_manager.h"
#include "extensions/browser/extensions_test.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"

namespace {

// The maximum number of bytes that each extension is allowed to store in
// the SessionStorageManager. Currently, this is capped at 1MB. For testing
// purposes, here it will be capped at 1000 bytes.
constexpr int kQuotaBytesPerExtension =;

constexpr char kTestExtensionId1[] =;
constexpr char kTestExtensionId2[] =;

constexpr char kQuotaBytesExceededError[] =;

ValueChangeList;
AllOf;
Ge;
Le;

std::unique_ptr<KeyedService> SetTestingSessionStorageManager(
    content::BrowserContext* browser_context) {}

}  // namespace

namespace extensions {

class SessionStorageManagerUnittest : public ExtensionsTest {};

void SessionStorageManagerUnittest::SetUp() {}

void SessionStorageManagerUnittest::TearDown() {}

TEST_F(SessionStorageManagerUnittest, SetGetAndRemoveOneExtensionSuccessful) {}

TEST_F(SessionStorageManagerUnittest, ClearOneExtensionSuccessful) {}

TEST_F(SessionStorageManagerUnittest,
       SetGetAndRemovetMultipleExtensionsSuccessful) {}

TEST_F(SessionStorageManagerUnittest, ChangeValueOfExistentKeys) {}

TEST_F(SessionStorageManagerUnittest, SetFailsWhenQuotaIsExceeded) {}

TEST_F(SessionStorageManagerUnittest, GetEmptyWhenInvalidKey) {}

TEST_F(SessionStorageManagerUnittest, GetBytesInUse) {}

}  // namespace extensions