#include <memory>
#include <set>
#include <utility>
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/process/process.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/run_until.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h"
#include "base/uuid.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/apps/platform_apps/app_browsertest_util.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/devtools/devtools_window_testing.h"
#include "chrome/browser/hid/chrome_hid_delegate.h"
#include "chrome/browser/hid/hid_chooser_context.h"
#include "chrome/browser/hid/hid_chooser_context_factory.h"
#include "chrome/browser/lifetime/application_lifetime_desktop.h"
#include "chrome/browser/net/profile_network_context_service.h"
#include "chrome/browser/net/profile_network_context_service_factory.h"
#include "chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_link_manager_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h"
#include "chrome/browser/safe_browsing/test_safe_browsing_service.h"
#include "chrome/browser/task_manager/task_manager_browsertest_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/hid/hid_chooser_controller.h"
#include "chrome/browser/ui/login/login_handler.h"
#include "chrome/browser/usb/usb_browser_test_utils.h"
#include "chrome/browser/usb/usb_chooser_context.h"
#include "chrome/browser/usb/usb_chooser_context_factory.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/tracing.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/download/public/common/download_task_runner.h"
#include "components/find_in_page/find_tab_helper.h"
#include "components/guest_view/browser/guest_view_manager.h"
#include "components/guest_view/browser/guest_view_manager_delegate.h"
#include "components/guest_view/browser/guest_view_manager_factory.h"
#include "components/guest_view/browser/test_guest_view_manager.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_link_manager.h"
#include "components/permissions/mock_chooser_controller_view.h"
#include "components/permissions/test/mock_permission_prompt_factory.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/core/browser/db/fake_database_manager.h"
#include "components/security_interstitials/content/security_interstitial_tab_helper.h"
#include "components/version_info/channel.h"
#include "components/version_info/version_info.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/hid_chooser.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_process_host_creation_observer.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_observer.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/site_isolation_policy.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test_content_browser_client.h"
#include "content/public/test/content_mock_cert_verifier.h"
#include "content/public/test/download_test_observer.h"
#include "content/public/test/fake_speech_recognition_manager.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/find_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "content/public/test/no_renderer_crashes_assertion.h"
#include "content/public/test/scoped_accessibility_mode_override.h"
#include "content/public/test/test_file_error_injector.h"
#include "content/public/test/test_frame_navigation_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "content/public/test/url_loader_interceptor.h"
#include "extensions/browser/api/declarative/rules_cache_delegate.h"
#include "extensions/browser/api/declarative/rules_registry.h"
#include "extensions/browser/api/declarative/rules_registry_service.h"
#include "extensions/browser/api/declarative/test_rules_registry.h"
#include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
#include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
#include "extensions/browser/process_map.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/extensions_client.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/test/extension_test_message_listener.h"
#include "media/base/media_switches.h"
#include "net/dns/mock_host_resolver.h"
#include "net/ssl/client_cert_identity_test_util.h"
#include "net/ssl/client_cert_store.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "net/test/test_data_directory.h"
#include "pdf/buildflags.h"
#include "ppapi/buildflags/buildflags.h"
#include "services/device/public/cpp/test/fake_hid_manager.h"
#include "services/device/public/cpp/test/fake_usb_device_manager.h"
#include "services/device/public/cpp/test/scoped_geolocation_overrider.h"
#include "services/device/public/mojom/hid.mojom.h"
#include "services/network/public/cpp/network_switches.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/switches.h"
#include "ui/accessibility/ax_mode.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/display/display_switches.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "ui/gfx/geometry/point.h"
#include "ui/latency/latency_info.h"
#include "url/url_constants.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_features.h"
#include "ash/webui/settings/public/constants/routes.mojom.h"
#include "chrome/browser/ash/system_web_apps/system_web_app_manager.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chrome/browser/extensions/extension_keeplist_chromeos.h"
#endif
#if defined(USE_AURA)
#include "ui/aura/env.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/window.h"
#endif
#if BUILDFLAG(ENABLE_PPAPI)
#include "content/public/test/ppapi_test_utils.h"
#endif
#if BUILDFLAG(ENABLE_PDF)
#include "base/test/with_feature_override.h"
#include "chrome/browser/pdf/pdf_extension_test_util.h"
#include "chrome/browser/pdf/test_pdf_viewer_stream_manager.h"
#include "pdf/pdf_features.h"
#endif
ContextMenuMatcher;
ExtensionsAPIClient;
MenuItem;
GuestViewManager;
TestGuestViewManager;
TestGuestViewManagerFactory;
NoStatePrefetchLinkManager;
NoStatePrefetchLinkManagerFactory;
MatchAboutBlankTab;
MatchAnyApp;
MatchAnyBackground;
MatchAnyTab;
MatchAnyWebView;
MatchApp;
MatchBackground;
MatchWebView;
WaitForTaskManagerRows;
MenuModel;
namespace {
const char kEmptyResponsePath[] = …;
const char kRedirectResponsePath[] = …;
const char kUserAgentRedirectResponsePath[] = …;
const char kCacheResponsePath[] = …;
const char kRedirectResponseFullPath[] = …;
class RenderWidgetHostVisibilityObserver
: public content::RenderWidgetHostObserver { … };
class ContextMenuShownObserver { … };
class EmbedderWebContentsObserver : public content::WebContentsObserver { … };
void ExecuteScriptWaitForTitle(content::WebContents* web_contents,
const char* script,
const char* title) { … }
#if defined(USE_AURA)
class SelectControlWaiter : public aura::WindowObserver,
public aura::EnvObserver { … };
class LeftMouseClick { … };
#endif
bool IsShowingInterstitial(content::WebContents* tab) { … }
[[nodiscard]] bool BrowserInitNavigationToUrl(guest_view::GuestViewBase* guest,
const GURL& url) { … }
}
class MockWebContentsDelegate : public content::WebContentsDelegate { … };
class MockDownloadWebContentsDelegate : public content::WebContentsDelegate { … };
class WebViewTest : public extensions::PlatformAppBrowserTest { … };
WebViewSizeTest;
WebViewVisibilityTest;
WebViewSpeechAPITest;
WebViewAccessibilityTest;
WebViewNewWindowTest;
class WebViewDPITest : public WebViewTest { … };
class WebContentsAudioMutedObserver : public content::WebContentsObserver { … };
class IsAudibleObserver : public content::WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebViewTest, AudibilityStatePropagates) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, SetAudioMuted) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, WebViewRespectsInsets) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AudioMutesWhileAttached) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AudioMutesOnAttach) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AudioStateJavascriptAPI) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AutoplayPolicy) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_SpatialNavigationJavascriptAPI …
#else
#define MAYBE_SpatialNavigationJavascriptAPI …
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_SpatialNavigationJavascriptAPI) { … }
IN_PROC_BROWSER_TEST_F(WebViewVisibilityTest, GuestVisibilityChanged) { … }
IN_PROC_BROWSER_TEST_F(WebViewVisibilityTest, EmbedderVisibilityChanged) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ReloadEmbedder) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AddRemoveWebView_AddRemoveWebView) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest, AutoSize) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, DisplayNoneSetSrc) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ExecuteScript) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ExecuteCode) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest, Shim_TestAutosizeAfterNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAllowTransparencyAttribute) { … }
IN_PROC_BROWSER_TEST_F(WebViewDPITest, Shim_TestAutosizeHeight) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest, Shim_TestAutosizeHeight) { … }
IN_PROC_BROWSER_TEST_F(WebViewDPITest, Shim_TestAutosizeBeforeNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest, Shim_TestAutosizeBeforeNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewDPITest, Shim_TestAutosizeRemoveAttributes) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest, Shim_TestAutosizeRemoveAttributes) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest,
DISABLED_Shim_TestAutosizeWithPartialAttributes) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAPIMethodExistence) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestCustomElementCallbacksInaccessible) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIExistence) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIAddListener) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIErrorOccurred) { … }
#if defined(USE_AURA)
IN_PROC_BROWSER_TEST_F(WebViewTest, SelectShowHide) { … }
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestChromeExtensionURL) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestChromeExtensionRelativePath) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestContentInitiatedNavigationToDataUrlBlocked) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestDisplayNoneWebviewLoad) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_MAC)
#define MAYBE_Shim_TestDisplayNoneWebviewRemoveChild …
#else
#define MAYBE_Shim_TestDisplayNoneWebviewRemoveChild …
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest,
MAYBE_Shim_TestDisplayNoneWebviewRemoveChild) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestDisplayBlock) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestInlineScriptFromAccessibleResources) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestInvalidChromeExtensionURL) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestEventName) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestOnEventProperty) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadProgressEvent) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestDestroyOnEventListener) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestCannotMutateEventName) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestPartitionChangeAfterNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestPartitionRemovalAfterNavigationFails) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddContentScript) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddMultipleContentScripts) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
Shim_TestAddContentScriptWithSameNameShouldOverwriteTheExistingOne) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
Shim_TestAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddAndRemoveContentScripts) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
Shim_TestAddContentScriptsWithNewWindowAPI) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
Shim_TestContentScriptIsInjectedAfterTerminateAndReloadWebView) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestContentScriptExistsAsLongAsWebViewTagExists) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAddContentScriptWithCode) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
Shim_TestAddMultipleContentScriptsWithCodeAndCheckGeneratedScriptUrl) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScript) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
DISABLED_Shim_TestExecuteScriptIsAbortedWhenWebViewSourceIsChanged) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
Shim_TestExecuteScriptIsAbortedWhenWebViewSourceIsInvalid) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestTerminateAfterExit) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAssignSrcAfterCrash) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestNavOnConsecutiveSrcAttributeChanges) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavOnSrcAttributeChange) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavigateAfterResize) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNestedCrossOriginSubframes) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_Shim_TestNestedSubframes …
#else
#define MAYBE_Shim_TestNestedSubframes …
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_Shim_TestNestedSubframes) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveSrcAttribute) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestReassignSrcAttribute) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, Shim_TestNewWindow) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, Shim_TestNewWindowTwoListeners) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
Shim_TestNewWindowNoPreventDefault) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, Shim_TestNewWindowNoReferrerLink) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
Shim_TestWebViewAndEmbedderInNewWindow) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
Shim_TestWebViewAndEmbedderInNewWindow_Noopener) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
Shim_TestNewWindowAttachToExisting) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, Shim_TestNewWindowNoDeadlock) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, TwoIframesWebRequest) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_AttachAfterOpenerDestroyed) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_AttachInSubFrame) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_NewWindowNameTakesPrecedence) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_WebViewNameTakesPrecedence) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_NoName) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_Redirect) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_Close) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_DeferredAttachment) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_ExecuteScript) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_DeclarativeWebRequest) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_DiscardAfterOpenerDestroyed) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_WebRequest) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
DISABLED_NewWindow_WebRequestCloseWindow) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_WebRequestRemoveElement) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, NewWindow_UpdateOpener) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_OpenerDestroyedWhileUnattached) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_UnattachedVisitedByForEachRenderFrameHost) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_UnattachedVerifyViewMethods) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestContentLoadEvent) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestContentLoadEventWithDisplayNone) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestDeclarativeWebRequestAPI) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestDeclarativeWebRequestAPISendMessage) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
Shim_TestDeclarativeWebRequestAPISendMessageSecondWebView) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPI) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIOnlyForInstance) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIWithHeaders) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIGoogleProperty) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestWebRequestListenerSurvivesReparenting) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadStartLoadRedirect) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestLoadAbortChromeExtensionURLWrongPartition) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortEmptyResponse) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalChromeURL) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalFileURL) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalJavaScriptURL) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortInvalidNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortNonWebSafeScheme) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestReload) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestReloadAfterTerminate) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestGetProcessId) { … }
IN_PROC_BROWSER_TEST_F(WebViewVisibilityTest, Shim_TestHiddenBeforeNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveWebviewOnExit) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveWebviewAfterNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavigationToExternalProtocol) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest,
Shim_TestResizeWebviewWithDisplayNoneResizesContent) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest, Shim_TestResizeWebviewResizesContent) { … }
class WebViewSSLErrorTest : public WebViewTest { … };
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG)
#define MAYBE_ShowInterstitialForSSLError …
#else
#define MAYBE_ShowInterstitialForSSLError …
#endif
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest, MAYBE_ShowInterstitialForSSLError) { … }
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest, NavigateBackFromSSLError) { … }
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG)
#define MAYBE_InterstitialPageRouteEvents …
#else
#define MAYBE_InterstitialPageRouteEvents …
#endif
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest, MAYBE_InterstitialPageRouteEvents) { … }
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG)
#define MAYBE_InterstitialPageDetach …
#else
#define MAYBE_InterstitialPageDetach …
#endif
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest, MAYBE_InterstitialPageDetach) { … }
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG)
#define MAYBE_InterstitialTearDown …
#else
#define MAYBE_InterstitialTearDown …
#endif
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest, MAYBE_InterstitialTearDown) { … }
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest,
InterstitialTearDownOnBrowserShutdown) { … }
class WebViewSafeBrowsingTest : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(WebViewSafeBrowsingTest,
Shim_TestLoadAbortSafeBrowsing) { … }
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest, GuestLoadsHttpsWithoutError) { … }
IN_PROC_BROWSER_TEST_F(WebViewSSLErrorTest, GuestLoadsHttpWithoutError) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, CannotNavigateGuestToChromeURL) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ShimSrcAttribute) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, NoPrerenderer) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, TaskManagerExistingWebView) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, TaskManagerNewWebView) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, CookieIsolation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, PRE_StoragePersistence) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, StoragePersistence) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, DOMStorageIsolation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, FindabilityIsolation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, IndexedDBIsolation) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH) && \
(!defined(NDEBUG) || defined(ADDRESS_SANITIZER))
#define MAYBE_CloseOnLoadcommit …
#else
#define MAYBE_CloseOnLoadcommit …
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_CloseOnLoadcommit) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, MediaAccessAPIDeny_TestDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
MediaAccessAPIDeny_TestDenyThenAllowThrows) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
MediaAccessAPIDeny_TestDenyWithPreventDefault) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
MediaAccessAPIDeny_TestNoListenersImplyDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
MediaAccessAPIDeny_TestNoPreventDefaultImpliesDeny) { … }
void WebViewTest::MediaAccessAPIAllowTestHelper(const std::string& test_name) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, OpenURLFromTab_CurrentTab_Abort) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, OpenURLFromTab_CurrentTab_Succeed) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, OpenURLFromTab_NewWindow_Abort) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest,
NewWindow_DifferentCoopStatesInRelatedWebviews) { … }
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, DestroyOpenerBeforeAttachment) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ContextMenuInspectElement) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
class WebViewSettingsRevampTest : public WebViewTest,
public testing::WithParamInterface<bool> {
public:
WebViewSettingsRevampTest() {
scoped_feature_list_.InitWithFeatureState(
ash::features::kOsSettingsRevampWayfinding,
GetParam());
}
~WebViewSettingsRevampTest() override = default;
static std::string DescribeParams(
const testing::TestParamInfo<ParamType>& info) {
return info.param ? "OsSettingsRevampWayfindingEnabled"
: "OsSettingsRevampWayfindingDisabled";
}
private:
base::test::ScopedFeatureList scoped_feature_list_;
};
INSTANTIATE_TEST_SUITE_P(WebViewTests,
WebViewSettingsRevampTest,
testing::Bool(),
WebViewSettingsRevampTest::DescribeParams);
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_P(WebViewSettingsRevampTest, ContextMenuLanguageSettings) {
#else
IN_PROC_BROWSER_TEST_F(WebViewTest, ContextMenuLanguageSettings) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ContextMenusAPI_Basic) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ContextMenusAPI_PreventDefault) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, TestContextMenu) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, MediaAccessAPIAllow_TestAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, MediaAccessAPIAllow_TestAllowAndThenDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, MediaAccessAPIAllow_TestAllowTwice) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, MediaAccessAPIAllow_TestAllowAsync) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, MediaAccessAPIAllow_TestCheck) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ScreenCoordinates) { … }
#if defined(LEAK_SANITIZER)
#define MAYBE_TearDownTest …
#else
#define MAYBE_TearDownTest …
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_TearDownTest) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ContentScriptFetch) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasNoAccessAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasNoAccessDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasAccessAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasAccessDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
GeolocationAPIEmbedderHasAccessMultipleBridgeIdAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasAccessAllowGeolocation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasAccessDenyGeolocation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasAccessAllowCamera) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, PermissionsAPIEmbedderHasAccessDenyCamera) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasAccessAllowMicrophone) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasAccessDenyMicrophone) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, PermissionsAPIEmbedderHasAccessAllowMedia) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, PermissionsAPIEmbedderHasAccessDenyMedia) { … }
class MockHidDelegate : public ChromeHidDelegate { … };
class WebHidWebViewTest : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(WebHidWebViewTest,
PermissionsAPIEmbedderHasAccessAllowHid) { … }
IN_PROC_BROWSER_TEST_F(WebHidWebViewTest,
PermissionsAPIEmbedderHasAccessDenyHid) { … }
IN_PROC_BROWSER_TEST_F(WebHidWebViewTest,
PermissionsAPIEmbedderHasAccessCloseWindowHid) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessAllowGeolocation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessDenyGeolocation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessAllowCamera) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessDenyCamera) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessAllowMicrophone) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessDenyMicrophone) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessAllowMedia) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
PermissionsAPIEmbedderHasNoAccessDenyMedia) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPICancelGeolocation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_GeolocationRequestGone) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, FileSystemAPIRequestFromMainThreadAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, FileSystemAPIRequestFromMainThreadDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
FileSystemAPIRequestFromMainThreadDefaultAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, FileSystemAPIRequestFromWorkerAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, FileSystemAPIRequestFromWorkerDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
FileSystemAPIRequestFromWorkerDefaultAllow) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
FileSystemAPIRequestFromSharedWorkerOfSingleWebViewGuestAllow) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
FileSystemAPIRequestFromSharedWorkerOfSingleWebViewGuestDeny) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
FileSystemAPIRequestFromSharedWorkerOfSingleWebViewGuestDefaultAllow) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
FileSystemAPIRequestFromSharedWorkerOfMultiWebViewGuestsAllow) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
FileSystemAPIRequestFromSharedWorkerOfMultiWebViewGuestsDeny) { … }
IN_PROC_BROWSER_TEST_F(
WebViewTest,
FileSystemAPIRequestFromSharedWorkerOfMultiWebViewGuestsDefaultAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ClearData) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ClearSessionCookies) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ClearPersistentCookies) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ClearDataTwice) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_ClearDataCache …
#else
#define MAYBE_ClearDataCache …
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_ClearDataCache) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ConsoleMessage) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, DownloadPermission) { … }
namespace {
const char kDownloadPathPrefix[] = …;
std::unique_ptr<net::test_server::HttpResponse> HandleDownloadRequestWithCookie(
const net::test_server::HttpRequest& request) { … }
class DownloadManagerWaiter : public content::DownloadManager::Observer { … };
}
IN_PROC_BROWSER_TEST_F(WebViewTest, DownloadCookieIsolation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, PRE_DownloadCookieIsolation_CrossSession) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, DownloadCookieIsolation_CrossSession) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AllowlistedContentScript) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, SendMessageToExtensionFromGuest) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, SendMessageToComponentExtensionFromGuest) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentReady) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentInteractive) { … }
IN_PROC_BROWSER_TEST_F(WebViewSpeechAPITest,
SpeechRecognitionAPI_HasPermissionAllow) { … }
IN_PROC_BROWSER_TEST_F(WebViewSpeechAPITest,
SpeechRecognitionAPI_HasPermissionDeny) { … }
IN_PROC_BROWSER_TEST_F(WebViewSpeechAPITest,
SpeechRecognitionAPI_NoPermission) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, UserAgent) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_UserAgent_NewWindow …
#else
#define MAYBE_UserAgent_NewWindow …
#endif
IN_PROC_BROWSER_TEST_F(WebViewNewWindowTest, MAYBE_UserAgent_NewWindow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, NoPermission) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestAlertDialog) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, TestConfirmDialog) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialogCancel) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialogDefaultCancel) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialogDefaultGCCancel) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestPromptDialog) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, NoContentSettingsAPI) { … }
class WebViewCaptureTest : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestZoomAPI) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestFindAPI) { … }
#if defined(MEMORY_SANITIZER)
#define MAYBE_Shim_TestFindAPI_findupdate …
#else
#define MAYBE_Shim_TestFindAPI_findupdate …
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_Shim_TestFindAPI_findupdate) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_testFindInMultipleWebViews) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestFindAfterTerminate) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadDataAPI) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadDataAPIAccessibleResources) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, LoadDataAPINotRelativeToAnotherExtension) { … }
IN_PROC_BROWSER_TEST_F(WebViewSizeTest, Shim_TestResizeEvents) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestPerOriginZoomMode) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestPerViewZoomMode) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestDisabledZoomMode) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestZoomBeforeNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, HttpAuth) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, HttpAuthIdentical) { … }
namespace {
class NullWebContentsDelegate : public content::WebContentsDelegate { … };
class ClientCertStoreStub : public net::ClientCertStore { … };
base::OnceClosure ClientCertStoreStub::quit_closure_;
}
class WebViewCertificateSelectorTest : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(WebViewCertificateSelectorTest,
CertificateSelectorForGuest) { … }
IN_PROC_BROWSER_TEST_F(WebViewCertificateSelectorTest,
CertificateSelectorForGuestMisconfigured) { … }
class WebViewChannelTest
: public WebViewTest,
public testing::WithParamInterface<version_info::Channel> { … };
#if BUILDFLAG(IS_MAC)
#define MAYBE_Shim_TestRulesRegistryIDAreRemovedAfterWebViewIsGone …
#else
#define MAYBE_Shim_TestRulesRegistryIDAreRemovedAfterWebViewIsGone …
#endif
IN_PROC_BROWSER_TEST_P(
WebViewChannelTest,
MAYBE_Shim_TestRulesRegistryIDAreRemovedAfterWebViewIsGone) { … }
IN_PROC_BROWSER_TEST_P(WebViewChannelTest,
Shim_WebViewWebRequestRegistryHasNoPersistentCache) { … }
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebViewInsideFrame) { … }
IN_PROC_BROWSER_TEST_F(WebViewCaptureTest, DISABLED_Shim_ScreenshotCapture) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_WebViewInBackgroundPage) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AllowTransparencyAndAllowScalingPropagate) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, BasicPostMessage) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestGarbageCollect) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestCloseNewWindowCleanup) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestFocusWhileFocused) { … }
#if BUILDFLAG(ENABLE_PDF)
class WebViewPdfTest : public base::test::WithFeatureOverride,
public WebViewTest { … };
IN_PROC_BROWSER_TEST_P(WebViewPdfTest, PdfContainerBounds) { … }
IN_PROC_BROWSER_TEST_P(WebViewPdfTest, ContextMenuNavigationInWebView) { … }
IN_PROC_BROWSER_TEST_P(WebViewPdfTest, Shim_TestDialogInPdf) { … }
INSTANTIATE_FEATURE_OVERRIDE_TEST_SUITE(…);
#endif
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestMailtoLink) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
Shim_TestRendererNavigationRedirectWhileUnattached) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveBeforeAttach) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestBlobURL) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestBlockedNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, LoadWebviewAccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, NavigateGuestToWebviewAccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, ReloadWebviewAccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
CookiesEnabledAfterWebviewAccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, CannotIframeWebviewAccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
CallingExtensionAPIsFromWebviewAccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, BlobInWebviewAccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, LoadWebviewInaccessibleResource) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
LoadAccessibleSubresourceInAppWebviewFrame) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest,
InaccessibleResourceDoesNotLoadInAppWebviewFrame) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_ReloadAfterCrash) { … }
class WebViewTestNoDomAutomationController : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(WebViewTestNoDomAutomationController,
LoadWebviewInsideIframe) { … }
IN_PROC_BROWSER_TEST_F(WebViewAccessibilityTest, LoadWebViewAccessibility) { … }
IN_PROC_BROWSER_TEST_F(WebViewAccessibilityTest, FocusAccessibility) { … }
IN_PROC_BROWSER_TEST_F(WebViewAccessibilityTest,
DISABLED_FocusAccessibilityNestedFrame) { … }
class WebContentsAccessibilityEventWatcher
: public content::WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebViewAccessibilityTest, DISABLED_TouchAccessibility) { … }
class WebViewGuestScrollTest : public WebViewTest,
public testing::WithParamInterface<bool> { … };
class WebViewGuestScrollTouchTest : public WebViewGuestScrollTest { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(WebViewGuestScrollTest, TestGuestWheelScrollsBubble) { … }
IN_PROC_BROWSER_TEST_P(WebViewGuestScrollTest,
ScrollLatchingPreservedInGuests) { … }
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(WebViewGuestScrollTouchTest,
TestGuestGestureScrollsBubble) { … }
class ChromeSignInWebViewTest : public WebViewTest { … };
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
IN_PROC_BROWSER_TEST_F(ChromeSignInWebViewTest,
ClosingChromeSignInShouldNotCrash) { … }
#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_NoFindInPageForUnattachedGuest …
#else
#define MAYBE_NoFindInPageForUnattachedGuest …
#endif
IN_PROC_BROWSER_TEST_F(ChromeSignInWebViewTest,
MAYBE_NoFindInPageForUnattachedGuest) { … }
class IsolatedOriginWebViewTest : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(IsolatedOriginWebViewTest, IsolatedOriginInWebview) { … }
IN_PROC_BROWSER_TEST_F(IsolatedOriginWebViewTest,
LoadIsolatedOriginInWebviewAfterLoadingInRegularTab) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, AutoResizeMessages) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, TouchpadPinchSyntheticWheelEvents) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, OpenAndCloseDevTools) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, NoExtensionScriptsInjectedInWebview) { … }
GuestViewExtensionNameCollisionTest;
IN_PROC_BROWSER_TEST_F(GuestViewExtensionNameCollisionTest,
GuestViewNamesDoNotCollideWithExtensions) { … }
class PrivateNetworkAccessWebViewTest : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(PrivateNetworkAccessWebViewTest, ClassificationInGuest) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, LoadDisallowedExtensionURLInSubframe) { … }
class PopupWaiter : public content::WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebViewTest, ShutdownWithUnshownPopup) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, InsertIntoIframe) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, CreateAndInsertInIframe) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, InsertIntoMainFrameFromIframe) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, InsertIntoOtherWindow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, CreateAndInsertInOtherWindow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, InsertFromOtherWindow) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, InsertIntoDetachedIframe) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, PreserveNameAcrossNavigationsAndCrashes) { … }
#if BUILDFLAG(ENABLE_PPAPI)
class WebViewPPAPITest : public WebViewTest {
protected:
void SetUpCommandLine(base::CommandLine* command_line) override {
WebViewTest::SetUpCommandLine(command_line);
ASSERT_TRUE(ppapi::RegisterTestPlugin(command_line));
}
};
IN_PROC_BROWSER_TEST_F(WebViewPPAPITest, Shim_TestPlugin) {
TestHelper("testPlugin", "web_view/shim", NO_TEST_SERVER);
}
IN_PROC_BROWSER_TEST_F(WebViewPPAPITest, Shim_TestPluginLoadPermission) {
TestHelper("testPluginLoadPermission", "web_view/shim", NO_TEST_SERVER);
}
#endif
constexpr char kWebstoreURL[] = …;
constexpr char kNewWebstoreURL[] = …;
constexpr char kWebstoreURLOverride[] = …;
class WebstoreWebViewTest : public WebViewTest,
public testing::WithParamInterface<GURL> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(WebstoreWebViewTest, NoRendererKillWithChromeWebStore) { … }
SitePerProcessWebViewTest;
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, SimpleNavigations) { … }
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, ErrorPageIsolation) { … }
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, ErrorPageInSubframe) { … }
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, BrowsingInstanceSwap) { … }
class GuestProcessCreationObserver
: public content::RenderProcessHostCreationObserver { … };
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest,
NoExtraGuestProcessAtResponseTime) { … }
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, NavigateToAboutBlank) { … }
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, Shim_BlankWebview) { … }
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, ContentScript) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_ContentScriptInOOPIF …
#else
#define MAYBE_ContentScriptInOOPIF …
#endif
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, MAYBE_ContentScriptInOOPIF) { … }
IN_PROC_BROWSER_TEST_F(SitePerProcessWebViewTest, SubframeProcessReuse) { … }
class WebViewWithDefaultSiteInstanceTest : public SitePerProcessWebViewTest { … };
IN_PROC_BROWSER_TEST_F(WebViewWithDefaultSiteInstanceTest, SimpleNavigations) { … }
IN_PROC_BROWSER_TEST_F(WebViewWithDefaultSiteInstanceTest, IsolatedOrigin) { … }
IN_PROC_BROWSER_TEST_F(WebViewWithDefaultSiteInstanceTest, FencedFrame) { … }
class WebViewFencedFrameTest : public WebViewTest,
public testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(WebViewFencedFrameTest,
FencedFrameInGuestHasGuestSiteInstance) { … }
class WebViewUsbTest : public WebViewTest { … };
IN_PROC_BROWSER_TEST_F(WebViewUsbTest, Shim_TestCannotRequestUsb) { … }
IN_PROC_BROWSER_TEST_F(WebViewUsbTest, Shim_TestCannotReuseUsbPairedInTab) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestCannotRequestFonts) { … }
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestCannotRequestFontsGrantedInTab) { … }