#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "build/config/coverage/buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h"
#include "chrome/browser/signin/signin_promo.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/test_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/web_ui_mocha_browser_test.h"
#include "content/public/browser/back_forward_cache.h"
#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/drop_data.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_switches.h"
#include "chrome/browser/ash/login/test/oobe_screen_waiter.h"
#include "chrome/browser/ash/login/ui/login_display_host.h"
#include "chrome/browser/ui/webui/ash/login/welcome_screen_handler.h"
#endif
#if !BUILDFLAG(IS_MAC)
class WebUIWebViewBrowserTest : public WebUIMochaBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DisplayNone) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH) && !defined(NDEBUG)
#define MAYBE_ExecuteScriptCode …
#else
#define MAYBE_ExecuteScriptCode …
#endif
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, MAYBE_ExecuteScriptCode) { … }
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ExecuteScriptCodeFromFile) { … }
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddContentScript) { … }
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddMultiContentScripts) { … }
IN_PROC_BROWSER_TEST_F(
WebUIWebViewBrowserTest,
AddContentScriptWithSameNameShouldOverwriteTheExistingOne) { … }
#if (BUILDFLAG(IS_CHROMEOS_ASH) && !defined(NDEBUG)) || \
BUILDFLAG(USE_JAVASCRIPT_COVERAGE)
#define MAYBE_AddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView …
#else
#define MAYBE_AddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView …
#endif
IN_PROC_BROWSER_TEST_F(
WebUIWebViewBrowserTest,
MAYBE_AddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView) { … }
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddAndRemoveContentScripts) { … }
class WebUIWebViewCoverageDisabledBrowserTest : public WebUIWebViewBrowserTest { … };
#if BUILDFLAG(IS_CHROMEOS_ASH) && \
(!defined(NDEBUG) || defined(ADDRESS_SANITIZER))
#define MAYBE_AddContentScriptsWithNewWindowAPI …
#else
#define MAYBE_AddContentScriptsWithNewWindowAPI …
#endif
IN_PROC_BROWSER_TEST_F(WebUIWebViewCoverageDisabledBrowserTest,
MAYBE_AddContentScriptsWithNewWindowAPI) { … }
IN_PROC_BROWSER_TEST_F(
WebUIWebViewBrowserTest,
DISABLED_ContentScriptIsInjectedAfterTerminateAndReloadWebView) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(USE_JAVASCRIPT_COVERAGE)
#define MAYBE_ContentScriptExistsAsLongAsWebViewTagExists …
#else
#define MAYBE_ContentScriptExistsAsLongAsWebViewTagExists …
#endif
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest,
MAYBE_ContentScriptExistsAsLongAsWebViewTagExists) { … }
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, AddContentScriptWithCode) { … }
IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ContextMenuInspectElement) { … }
#endif