#include <memory>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/scoped_observation.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_disabled_ui.h"
#include "chrome/browser/extensions/extension_error_controller.h"
#include "chrome/browser/extensions/extension_error_ui_default.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/external_install_error.h"
#include "chrome/browser/extensions/test_blocklist.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/recovery/recovery_install_global_error.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/global_error/global_error_observer.h"
#include "chrome/browser/ui/global_error/global_error_service.h"
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
#include "components/crx_file/crx_verifier.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/extension_creator.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/mock_external_provider.h"
#include "extensions/browser/sandboxed_unpacker.h"
#include "extensions/common/api/extension_action/action_info.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/feature_switch.h"
namespace {
void ShowPendingError(Browser* browser) { … }
base::FilePath PackCRXInTempDir(base::ScopedTempDir* temp_dir,
const char* extension_folder,
const char* pem_file) { … }
class GlobalErrorWaiter : public GlobalErrorObserver { … };
}
class GlobalErrorBubbleTest : public DialogBrowserTest { … };
void GlobalErrorBubbleTest::ShowUi(const std::string& name) { … }
IN_PROC_BROWSER_TEST_F(GlobalErrorBubbleTest,
InvokeUi_ExtensionDisabledGlobalError) { … }
IN_PROC_BROWSER_TEST_F(GlobalErrorBubbleTest,
InvokeUi_ExtensionDisabledGlobalErrorRemote) { … }
IN_PROC_BROWSER_TEST_F(GlobalErrorBubbleTest,
DISABLED_InvokeUi_ExtensionGlobalError) { … }
IN_PROC_BROWSER_TEST_F(GlobalErrorBubbleTest,
InvokeUi_ExternalInstallBubbleAlert) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(GlobalErrorBubbleTest,
InvokeUi_RecoveryInstallGlobalError) {
ShowAndVerifyUi();
}
#endif