chromium/chrome/browser/extensions/api/extension_action/browser_action_browsertest.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 "base/files/file_path.h"
#include "base/functional/bind.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/extension_action.h"
#include "extensions/browser/extension_action_manager.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/state_store.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_id.h"
#include "extensions/test/extension_test_message_listener.h"
#include "third_party/skia/include/core/SkColor.h"

namespace extensions {

namespace {

// A key into the StateStore; we don't use any results, but need to know when
// it's initialized.
const char kBrowserActionStorageKey[] =;
// The name of the extension we add.
const char kExtensionName[] =;

void QuitMessageLoop(content::MessageLoopRunner* runner,
                     std::optional<base::Value> value) {}

// We need to wait for the state store to initialize and respond to requests
// so we can see if the preferences persist. Do this by posting our own request
// to the state store, which should be handled after all others.
void WaitForStateStore(Profile* profile, const ExtensionId& extension_id) {}

}  // namespace

// Setup for the test by loading an extension, which should set the browser
// action background to blue.
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest,
                       PRE_BrowserActionDefaultPersistence) {}

// When Chrome restarts, the Extension will immediately update the browser
// action, but will not modify the badge background color. Thus, the background
// should remain blue (persisting the default set in onInstalled()).
IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, BrowserActionDefaultPersistence) {}

}  // namespace extensions