chromium/chrome/browser/ui/views/extensions/extension_installed_bubble_view_browsertest.cc

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

#include <algorithm>

#include "base/memory/raw_ptr.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/ui/extensions/extension_install_ui.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "content/public/test/browser_test.h"
#include "extensions/common/api/extension_action/action_info.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/widget.h"

class ExtensionInstalledBubbleViewsBrowserTest
    : public SupportsTestDialog<extensions::ExtensionBrowserTest> {};

void ExtensionInstalledBubbleViewsBrowserTest::ShowUi(const std::string& name) {}

bool ExtensionInstalledBubbleViewsBrowserTest::VerifyUi() {}

void ExtensionInstalledBubbleViewsBrowserTest::WaitForUserDismissal() {}

#if BUILDFLAG(IS_CHROMEOS_ASH)
// None of these tests work when run under Ash, because they need an
// AuraTestHelper constructed at an inconvenient time in test setup, which
// InProcessBrowserTest is not equipped to handle.
// TODO(ellyjones): Fix that, or figure out an alternate way to test this UI.
#define MAYBE_InvokeUi_default
#define MAYBE_InvokeUi_BrowserAction
#define MAYBE_InvokeUi_PageAction
#define MAYBE_InvokeUi_SignInPromo
#define MAYBE_InvokeUi_Omnibox
#else
#define MAYBE_InvokeUi_default
#define MAYBE_InvokeUi_BrowserAction
#define MAYBE_InvokeUi_PageAction
#define MAYBE_InvokeUi_SignInPromo
#define MAYBE_InvokeUi_Omnibox
#endif

IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleViewsBrowserTest,
                       MAYBE_InvokeUi_default) {}

IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleViewsBrowserTest,
                       MAYBE_InvokeUi_BrowserAction) {}

IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleViewsBrowserTest,
                       MAYBE_InvokeUi_PageAction) {}

IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleViewsBrowserTest,
                       MAYBE_InvokeUi_SignInPromo) {}

IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleViewsBrowserTest,
                       MAYBE_InvokeUi_Omnibox) {}