#include "chrome/browser/ui/views/extensions/settings_overridden_dialog.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "chrome/browser/extensions/chrome_test_extension_loader.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/extensions/extensions_dialogs.h"
#include "chrome/browser/ui/extensions/settings_api_bubble_helpers.h"
#include "chrome/browser/ui/extensions/settings_overridden_dialog_controller.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/search_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/search_engines/search_engines_test_util.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/any_widget_observer.h"
#include "ui/views/widget/widget.h"
DialogResult;
namespace {
class TestDialogController : public SettingsOverriddenDialogController { … };
}
class SettingsOverriddenDialogViewBrowserTest : public DialogBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
InvokeUi_SimpleDialog) { … }
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
InvokeUi_SimpleDialogWithIcon) { … }
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
InvokeUi_NtpOverriddenDialog_BackToDefault) { … }
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
InvokeUi_NtpOverriddenDialog_Generic) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
InvokeUi_SearchOverriddenDialog_BackToGoogle) {
ShowAndVerifyUi();
}
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
InvokeUi_SearchOverriddenDialog_BackToOther) {
ShowAndVerifyUi();
}
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
InvokeUi_SearchOverriddenDialog_Generic) {
ShowAndVerifyUi();
}
#endif
IN_PROC_BROWSER_TEST_F(SettingsOverriddenDialogViewBrowserTest,
DialogWindowClosed) { … }