#include "content/browser/web_contents/web_contents_impl.h"
#include <array>
#include <optional>
#include <tuple>
#include <utility>
#include <vector>
#include "base/allocator/partition_alloc_features.h"
#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/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/strings/pattern.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/input/render_widget_host_input_event_router.h"
#include "components/ukm/test_ukm_recorder.h"
#include "components/url_formatter/url_formatter.h"
#include "content/browser/renderer_host/frame_tree.h"
#include "content/browser/renderer_host/navigation_entry_impl.h"
#include "content/browser/renderer_host/navigation_entry_restore_context_impl.h"
#include "content/browser/renderer_host/navigation_request.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/text_input_manager.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/content_navigation_policy.h"
#include "content/common/frame.mojom-test-utils.h"
#include "content/common/frame.mojom.h"
#include "content/public/browser/back_forward_cache.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/file_select_listener.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/javascript_dialog_manager.h"
#include "content/public/browser/media_player_id.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.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/browser/web_contents_observer.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/isolated_world_ids.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/back_forward_cache_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/mock_client_hints_controller_delegate.h"
#include "content/public/test/mock_web_contents_observer.h"
#include "content/public/test/navigation_handle_observer.h"
#include "content/public/test/no_renderer_crashes_assertion.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/resource_load_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 "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
#include "content/shell/browser/shell_content_browser_client.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "content/test/mock_reduce_accept_language_controller_delegate.h"
#include "content/test/test_content_browser_client.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "net/base/features.h"
#include "net/base/ip_endpoint.h"
#include "net/base/network_isolation_key.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/controllable_http_response.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "partition_alloc/buildflags.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/network/public/cpp/client_hints.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/mojom/web_client_hints_types.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/common/client_hints/client_hints.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/page/page_zoom.h"
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
#include "ui/base/clipboard/clipboard_format_type.h"
#include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
#include "ui/color/color_provider_manager.h"
#include "ui/color/color_provider_utils.h"
#include "ui/display/screen.h"
#include "url/gurl.h"
namespace content {
#define SCOPE_TRACED(statement) …
void ResizeWebContentsView(Shell* shell,
const gfx::Size& size,
bool set_start_page) { … }
class WebContentsImplBrowserTest : public ContentBrowserTest { … };
class NavigateOnCommitObserver : public WebContentsObserver { … };
class RenderViewSizeDelegate : public WebContentsDelegate { … };
class RenderViewSizeObserver : public WebContentsObserver { … };
class LoadingStateChangedDelegate : public WebContentsDelegate { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DumpAccessibilityTreeWithoutTreeID) { … }
namespace {
const char kFrameCountUMA[] = …;
const char kMaxFrameCountUMA[] = …;
class LoadFinishedWaiter : public WebContentsObserver { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DidStopLoadingWithNestedFrames) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ClearNonVisiblePendingOnFail) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || defined(THREAD_SANITIZER)
#define MAYBE_GetSizeForNewRenderView …
#else
#define MAYBE_GetSizeForNewRenderView …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MAYBE_GetSizeForNewRenderView) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, SetTitleOnPagehide) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, OpenURLSubframe) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, OpenURLNonExistentSubframe) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
AppendingFrameInWebUIDoesNotCrash) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
RenderFrameCreatedCorrectProcessForObservers) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
LoadingStateChangedForSameDocumentNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ResourceLoadComplete) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteFromNetworkCache) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteFromLocalResource) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteWithRedirect) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteNetError) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteAlwaysAccessNetwork) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteWithRedirects) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ResourceLoadCompleteIsMainFrame) { … }
struct LoadProgressObserver : public WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, LoadProgress) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, LoadProgressWithFrames) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
LoadProgressAfterInterruptedNav) { … }
struct FirstVisuallyNonEmptyPaintObserver : public WebContentsObserver { … };
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_FirstVisuallyNonEmptyPaint …
#else
#define MAYBE_FirstVisuallyNonEmptyPaint …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MAYBE_FirstVisuallyNonEmptyPaint) { … }
namespace {
class WebDisplayModeDelegate : public WebContentsDelegate { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ChangeDisplayMode) { … }
class MockPageScaleObserver : public WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ChangePageScale) { … }
#if BUILDFLAG(IS_ANDROID)
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SameInitialScaleAcrossNavigations) {
constexpr double kEpsilon = 0.01;
ASSERT_TRUE(embedded_test_server()->Start());
const GURL url(embedded_test_server()->GetURL("/title1.html"));
auto* contents = static_cast<WebContentsImpl*>(shell()->web_contents());
EXPECT_TRUE(NavigateToURL(shell(), url));
double initial_renderer_scale_1 =
EvalJs(contents, "window.visualViewport.scale").ExtractDouble();
double initial_browser_scale_1 =
contents->GetPrimaryPage().GetPageScaleFactor();
const auto rfh_id_1 = contents->GetPrimaryMainFrame()->GetGlobalId();
EXPECT_TRUE(NavigateToURL(shell(), url));
const auto rfh_id_2 = contents->GetPrimaryMainFrame()->GetGlobalId();
SCOPED_TRACE(testing::Message()
<< "CanSameSiteMainFrameNavigationsChangeRenderFrameHosts = "
<< CanSameSiteMainFrameNavigationsChangeRenderFrameHosts());
SCOPED_TRACE(testing::Message()
<< "Did change RenderFrameHost? " << (rfh_id_1 != rfh_id_2));
double initial_renderer_scale_2 =
EvalJs(contents, "window.visualViewport.scale").ExtractDouble();
double initial_browser_scale_2 =
contents->GetPrimaryPage().GetPageScaleFactor();
ASSERT_LT(initial_renderer_scale_1, 1.0 - kEpsilon);
ASSERT_NEAR(initial_renderer_scale_1, initial_renderer_scale_2, kEpsilon);
EXPECT_NEAR(initial_browser_scale_1, initial_renderer_scale_1, kEpsilon);
EXPECT_NEAR(initial_browser_scale_2, initial_renderer_scale_2, kEpsilon);
}
#endif
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ViewSourceDirectNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ViewSourceWindowOpen_ShouldBeBlocked) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ViewSourceRedirect_ShouldBeBlocked) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ViewSourceWebUI) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, NewNamedWindow) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
HasOriginalOpenerTracksThroughClosedWebContents) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
NoResetOnBeforeUnloadCanceledOnCommit) { … }
namespace {
void NavigateToDataURLAndCheckForTerminationDisabler(
Shell* shell,
const std::string& html,
bool expect_unload,
bool expect_beforeunload,
bool expect_pagehide,
bool expect_visibilitychange) { … }
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerNone) { … }
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTest,
SuddenTerminationDisablerNoneProcessTerminationDisallowed) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerOnUnload) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerOnPagehide) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerOnVisibilityChangeDocument) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerOnVisibilityChangeWindow) { … }
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTest,
SuddenTerminationDisablerOnVisibilityChangeRemoveDocumentListener) { … }
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTest,
SuddenTerminationDisablerOnVisibilityChangeRemoveWindowListener) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerOnBeforeUnload) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerAllThenNavigate) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuddenTerminationDisablerAllThenRemove) { … }
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTest,
SuddenTerminationDisablerWhenTabIsHiddenOnVisibilityChange) { … }
class TestWCDelegateForDialogsAndFullscreen : public JavaScriptDialogManager,
public WebContentsDelegate { … };
class MockFileSelectListener : public FileChooserImpl::FileSelectListenerImpl { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
JavaScriptDialogsInMainAndSubframes) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
JavaScriptDialogsNormalizeText) { … }
class WebContentsImplBrowserTestWithDifferentOriginSubframeDialogSuppression
: public WebContentsImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTestWithDifferentOriginSubframeDialogSuppression,
OriginTrialDisablesSuppression) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
CreateWebContentsWithRendererProcess) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
CreateWebContentsWithoutRendererProcess) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
NavigatingToWebUIUsesPreWarmedProcess) { … }
namespace {
class DownloadImageObserver { … };
void DownloadImageTestInternal(Shell* shell,
const GURL& image_url,
int expected_http_status,
int expected_number_of_images) { … }
void ExpectNoValidImageCallback(base::OnceClosure quit_closure,
int id,
int status_code,
const GURL& image_url,
const std::vector<SkBitmap>& bitmap,
const std::vector<gfx::Size>& sizes) { … }
void ExpectSingleValidImageCallback(base::OnceClosure quit_closure,
int expected_width,
int expected_height,
int id,
int status_code,
const GURL& image_url,
const std::vector<SkBitmap>& bitmap,
const std::vector<gfx::Size>& sizes) { … }
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, DownloadImage_HttpImage) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DISABLED_DownloadImage_Deny_FileImage) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DISABLED_DownloadImage_Allow_FileImage) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, DownloadImage_NoValidImage) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, DownloadImage_DataImage) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DownloadImage_InvalidDataImage) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, DownloadImage_DataImageSVG) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DownloadImage_PreferredSize) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DownloadImage_PreferredSizeZero) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DownloadImage_PreferredSizeClampedByMaxSize) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DownloadImage_PreferredWidthClampedByMaxSize) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DownloadImage_PreferredHeightClampedByMaxSize) { … }
namespace {
void ExpectTwoValidImageCallback(base::OnceClosure quit_closure,
const std::vector<gfx::Size>& expected_sizes,
int id,
int status_code,
const GURL& image_url,
const std::vector<SkBitmap>& bitmap,
const std::vector<gfx::Size>& sizes) { … }
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DownloadImage_MultipleImagesNoMaxSize) { … }
class PointerLockDelegate : public WebContentsDelegate { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DISABLED_RenderWidgetDeletedWhileMouseLockPending) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, UserAgentOverride) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
UserAgentOverrideDuringDeferredNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SetUserAgentOverrideFromDidStartNavigation) { … }
class NoEntryUserAgentInjector : public UserAgentInjector { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SetIsOverridingUserAgentNoEntry) { … }
class WebContentsImplBrowserTestClientHintsEnabled
: public WebContentsImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestClientHintsEnabled,
SetUserAgentOverrideFromDidStartNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestClientHintsEnabled,
SetUserAgentOverrideWithAcceptCHRestart) { … }
class WebContentsImplBrowserTestReduceAcceptLanguageOn
: public WebContentsImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestReduceAcceptLanguageOn,
HttpsReduceAcceptLanguageInNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestReduceAcceptLanguageOn,
HttpReduceAcceptLanguageInNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestReduceAcceptLanguageOn,
PersistAndGetReduceAcceptLanguage) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DialogsFromJavaScriptEndFullscreen) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DialogsFromJavaScriptEndFullscreenEvenInInnerWC) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, FileChooserEndsFullscreen) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
PopupsFromJavaScriptEndFullscreen) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
PopupsFromJavaScriptDoNotEndFullscreenWithinTab) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
PopupsOfPopupsFromJavaScriptEndFullscreen) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
PopupsFromJavaScriptEndFullscreenDownstream) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
FocusFromJavaScriptEndsFullscreen) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
FileChooserBlockedFromHiddenWebContents) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
EnumerateDirectoryBlockedFromHiddenWebContents) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
NewWindowBlockedForActiveFileChooser) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
FrameDetachInCopyDoesNotCrash) { … }
class UpdateTargetURLWaiter : public WebContentsDelegate { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, UpdateTargetURL) { … }
namespace {
class LoadStateWaiter : public WebContentsDelegate { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, DISABLED_UpdateLoadState) { … }
namespace {
class TitleChecker : public WebContentsDelegate { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, TitleUpdateOnRestore) { … }
namespace {
class OutgoingSetRendererPrefsMojoWatcher { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, SyncRendererPrefs) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, SetPageFrozen) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, FrozenAndUnfrozenIPC) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
SuppressedPopupWindowBrowserNavResumeLoad) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
PopupWindowBrowserNavResumeLoad) { … }
namespace {
class FullscreenWebContentsObserver : public WebContentsObserver { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, NotifyFullscreenAcquired) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, RejectFullscreenIfBlocked) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, FullscreenAfterFrameUnload) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
NotifyFullscreenAcquired_Navigate) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
NotifyFullscreenAcquired_SameOrigin) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, PropagateFullscreenOptions) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ToggleFullscreen) { … }
class MockDidOpenRequestedURLObserver : public WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, CtrlClickSubframeLink) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, SetVisibilityBeforeLoad) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
AttachNestedInnerWebContents) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, InnerWebContentsVisibility) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ShutdownDuringSpeculativeNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, MouseButtonsNavigate) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DISABLED_MouseButtonsDontNavigate) { … }
#if !BUILDFLAG(IS_ANDROID)
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTest,
MouseUpInOOPIframeShouldCancelMainFrameAutoscrollSelection) { … }
#endif
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, FrameCount) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MaxFrameCountForCrossProcessNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MaxFrameCountInjectedIframes) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MaxFrameCountRemovedIframes) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, ForEachRenderFrameHost) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ForEachRenderFrameHostInnerContents) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ForEachFrameTreeInnerContents) { … }
namespace {
class LoadingObserver : public WebContentsObserver { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
LoadingCallbacksOrder_CrossDocumentNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
LoadingCallbacksOrder_SameDocumentNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
LoadingCallbacksOrder_AbortedNavigation) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
LoadingCallbacksOrder_ErrorPage_EmptyBody) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
LoadingCallbacksOrder_ErrorPage_NonEmptyBody) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ThemeColorIsResetWhenNavigatingAway) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MimeTypeResetWhenNavigatingAway) { … }
namespace {
class DidChangeVerticalScrollDirectionObserver : public WebContentsObserver { … };
}
#if BUILDFLAG(IS_MAC)
#define MAYBE_DidChangeVerticalScrollDirection …
#else
#define MAYBE_DidChangeVerticalScrollDirection …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MAYBE_DidChangeVerticalScrollDirection) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DidChangeVerticalScrollDirectionWithIframe) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
RendererInitiatedUserAgentOverride) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
IgnoreUnresponsiveRendererDuringPaste) { … }
class DidStopLoadingInterceptor : public mojom::FrameHostInterceptorForTesting { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, RenderIdleTime) { … }
#if !BUILDFLAG(IS_ANDROID)
class WebContentsImplBrowserTestWindowControlsOverlay
: public WebContentsImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestWindowControlsOverlay,
ValidateWindowControlsOverlayToggleOn) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestWindowControlsOverlay,
ValidateWindowControlsOverlayToggleOff) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestWindowControlsOverlay,
GeometryChangeEvent) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTestWindowControlsOverlay,
ValidatePageScaleChangesInfoAndFiresEvent) { … }
class WebContentsImplBrowserTestWindowControlsOverlayNonOneDeviceScaleFactor
: public WebContentsImplBrowserTestWindowControlsOverlay { … };
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTestWindowControlsOverlayNonOneDeviceScaleFactor,
ValidateScaledCorrectly) { … }
IN_PROC_BROWSER_TEST_F(
WebContentsImplBrowserTestWindowControlsOverlayNonOneDeviceScaleFactor,
ValidateScaledCorrectlyAfterNavigate) { … }
#endif
class RenderFrameCreatedObserver : public WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ReinitializeMainFrameForCrashedTab) { … }
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
DeferredWindowOpenNavigationIsResumedWithEarlySwap) { … }
namespace {
class MediaWaiter : public WebContentsObserver { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
MediaDestroyedOnRendererCrash) { … }
class WebContentsImplInsecureLocalhostBrowserTest
: public WebContentsImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplInsecureLocalhostBrowserTest,
BlocksByDefault) { … }
class WebContentsImplAllowInsecureLocalhostBrowserTest
: public WebContentsImplInsecureLocalhostBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebContentsImplAllowInsecureLocalhostBrowserTest,
WarnsWithSwitch) { … }
class WebContentsPrerenderBrowserTest : public WebContentsImplBrowserTest { … };
class TestWebContentsDestructionObserver : public WebContentsObserver { … };
IN_PROC_BROWSER_TEST_F(WebContentsPrerenderBrowserTest,
SafeToCallForEachFrameTreeDuringDestruction) { … }
IN_PROC_BROWSER_TEST_F(WebContentsPrerenderBrowserTest,
GetContentsMimeTypeForEachPage) { … }
class WebContentsFencedFrameBrowserTest : public WebContentsImplBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebContentsFencedFrameBrowserTest, UpdateFavicon) { … }
IN_PROC_BROWSER_TEST_F(WebContentsFencedFrameBrowserTest, RemainsVisible) { … }
IN_PROC_BROWSER_TEST_F(WebContentsFencedFrameBrowserTest, DoNotUpdateAXTree) { … }
class MediaWatchTimeChangedDelegate : public WebContentsDelegate { … };
IN_PROC_BROWSER_TEST_F(WebContentsFencedFrameBrowserTest,
MediaWatchTimeCallback) { … }
}