#include <cmath>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <tuple>
#include <vector>
#include "base/barrier_closure.h"
#include "base/functional/overloaded.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/statistics_recorder.h"
#include "base/path_service.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_clock.h"
#include "base/test/test_future.h"
#include "base/test/with_feature_override.h"
#include "base/time/time.h"
#include "content/browser/aggregation_service/aggregatable_report.h"
#include "content/browser/private_aggregation/private_aggregation_manager_impl.h"
#include "content/browser/private_aggregation/private_aggregation_test_utils.h"
#include "content/browser/renderer_host/navigation_request.h"
#include "content/browser/shared_storage/shared_storage_document_service_impl.h"
#include "content/browser/shared_storage/shared_storage_event_params.h"
#include "content/browser/shared_storage/shared_storage_header_observer.h"
#include "content/browser/shared_storage/shared_storage_worklet_driver.h"
#include "content/browser/shared_storage/shared_storage_worklet_host.h"
#include "content/browser/shared_storage/shared_storage_worklet_host_manager.h"
#include "content/browser/storage_partition_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/network_service_util.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/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_content_browser_client.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/shared_storage_test_utils.h"
#include "content/public/test/test_frame_navigation_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_select_url_fenced_frame_config_observer.h"
#include "content/public/test/test_shared_storage_header_observer.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "content/test/fenced_frame_test_utils.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/controllable_http_response.h"
#include "net/test/embedded_test_server/request_handler_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/numeric/int128.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/fenced_frame/fenced_frame_utils.h"
#include "third_party/blink/public/common/shared_storage/shared_storage_utils.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
namespace content {
Pair;
UnorderedElementsAre;
SharedStorageReportingMap;
SharedStorageUrlSpecWithMetadata;
namespace {
WorkletHosts;
constexpr char kSharedStorageWorkletExpiredMessage[] = …;
constexpr auto& SetOperation = …;
constexpr auto& AppendOperation = …;
constexpr auto& DeleteOperation = …;
constexpr auto& ClearOperation = …;
constexpr char kSimplePagePath[] = …;
constexpr char kTitle1Path[] = …;
constexpr char kTitle2Path[] = …;
constexpr char kTitle3Path[] = …;
constexpr char kTitle4Path[] = …;
constexpr char kFencedFramePath[] = …;
constexpr char kPageWithBlankIframePath[] = …;
constexpr char kPngPath[] = …;
constexpr char kDestroyedStatusHistogram[] = …;
constexpr char kTimingKeepAliveDurationHistogram[] = …;
constexpr char kErrorTypeHistogram[] = …;
constexpr char kTimingUsefulResourceHistogram[] = …;
constexpr char kTimingRunExecutedInWorkletHistogram[] = …;
constexpr char kTimingSelectUrlExecutedInWorkletHistogram[] = …;
constexpr char kSelectUrlBudgetStatusHistogram[] = …;
constexpr double kBudgetAllowed = …;
constexpr int kStalenessThresholdDays = …;
constexpr int kSelectURLOverallBitBudget = …;
constexpr int kSelectURLSiteBitBudget = …;
constexpr char kGenerateURLsListScript[] = …;
constexpr char kRemainingBudgetPrefix[] = …;
constexpr char kEmptyAccessControlAllowOriginReplacement[] = …;
constexpr char kEmptySharedStorageCrossOriginAllowedReplacement[] = …;
std::string TimeDeltaToString(base::TimeDelta delta) { … }
MockPrivateAggregationShellContentBrowserClient;
void WaitForHistogram(const std::string& histogram_name) { … }
void WaitForHistograms(const std::vector<std::string>& histogram_names) { … }
std::string SerializeOptionalString(std::optional<std::string> str) { … }
std::string SerializeOptionalBool(std::optional<bool> b) { … }
std::string SerializeOptionalUrlsWithMetadata(
std::optional<std::vector<SharedStorageUrlSpecWithMetadata>>
urls_with_metadata) { … }
bool IsErrorMessage(const content::WebContentsConsoleObserver::Message& msg) { … }
auto describe_param = …;
}
class TestSharedStorageWorkletHost : public SharedStorageWorkletHost { … };
class TestSharedStorageObserver
: public SharedStorageWorkletHostManager::SharedStorageObserverInterface { … };
class TestSharedStorageWorkletHostManager
: public SharedStorageWorkletHostManager { … };
class SharedStorageBrowserTestBase : public ContentBrowserTest { … };
class SharedStorageBrowserTest : public SharedStorageBrowserTestBase,
public testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, AddModule_Success) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, AddModule_ScriptNotFound) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, AddModule_RedirectNotAllowed) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AddModule_ScriptExecutionFailure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AddModule_MultipleAddModuleFailure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AddModue_TheThirdTimeCompilesWithV8CodeCache) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, RunOperation_Success) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_Failure_RunOperationBeforeAddModule) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_Failure_InvalidOptionsArgument) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_VerifyUndefinedData) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_Failure_BlobDataTypeNotSupportedInWorklet) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_VerifyCryptoKeyData) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_Failure_ErrorInRunOperation) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
RunOperation_SecondRunOperationAfterKeepAliveTrueRun_Success) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
RunOperation_SecondRunOperationAfterKeepAliveFalseRun_Failure) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
RunOperation_SecondRunOperationAfterKeepAliveDefaultRun_Failure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, WorkletDestroyed) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, TwoWorklets) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
KeepAlive_StartBeforeAddModuleComplete_EndAfterAddModuleComplete) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
KeepAlive_StartBeforeAddModuleComplete_EndAfterTimeout) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
KeepAlive_StartBeforeRunOperationComplete_EndAfterRunOperationComplete) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
KeepAlive_StartBeforeSelectURLComplete_EndAfterSelectURLComplete) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, KeepAlive_SubframeWorklet) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
RenderProcessHostDestroyedDuringWorkletKeepAlive_SameOrigin) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
RenderProcessHostDestroyedDuringWorkletKeepAlive_CrossOrigin) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
SelectURL_BudgetMetadata_OperationSuccess_SingleInputURL) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
SelectURL_BudgetMetadata_OperationFailure_SingleInputURL) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
SelectURL_BudgetMetadata_Origin) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
SelectURL_SecondSelectURLAfterKeepAliveTrueSelectURL_Success) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
SelectURL_SecondSelectURLAfterKeepAliveFalseSelectURL_Failure) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
SelectURL_SecondSelectURLAfterKeepAliveDefaultSelectURL_Failure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
SelectURL_SelectURLAfterKeepAliveFalseRun_Failure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
SelectURL_SelectURLAfterKeepAliveTrueRun_Success) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
SelectURL_SelectURLAfterKeepAliveDefaultRun_Failure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_RunAfterKeepAliveTrueSelectURL_Success) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_RunAfterKeepAliveFalseSelectURL_Failure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
RunOperation_RunAfterKeepAliveDefaultSelectURL_Failure) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
SelectURL_ReportingMetadata_EmptyReportEvent) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, SetAppendOperationInDocument) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, DeleteOperationInDocument) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, ClearOperationInDocument) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, SetAppendOperationInWorklet) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AppendOperationFailedInWorklet) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, DeleteOperationInWorklet) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, ClearOperationInWorklet) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, ConsoleErrorInWorklet) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, GetOperationInWorklet) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AccessStorageInSameOriginDocument) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AccessStorageInDifferentOriginDocument) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest, KeysAndEntriesOperation) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
KeysAndEntriesOperation_MultipleBatches) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CreateWorklet_SameOrigin_Success) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
CreateWorklet_CrossOriginScript_DefaultDataOrigin_FailedCors) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
CreateWorklet_CrossOriginScript_ContextDataOrigin_FailedCors) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
CreateWorklet_CrossOriginScript_ScriptDataOrigin_FailedCors) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
CreateWorklet_CrossOriginScript_ScriptDataOrigin_FailedSharedStorageWorkletAllowedResponseHeaderCheck) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
CreateWorklet_CrossOriginScript_ContextDataOrigin_NoSharedStorageWorkletAllowedResponseHeader_Success) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
CreateWorklet_CrossOriginScript_DefaultDataOrigin_NoSharedStorageWorkletAllowedResponseHeader_Success) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
CreateWorklet_CrossOriginScript_ScriptDataOrigin_Success) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CreateWorkletAndSubframe_CrossOrigin) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CreateSubframeAndWorklet_CrossOrigin) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CreateTwoWorklets_CrossOrigin) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CrossOriginWorklet_VerifyDataOrigin) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CrossOriginScript_ContextDataOrigin_VerifyDataOrigin) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CrossOriginScript_DefaultDataOrigin_VerifyDataOrigin) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AddModule_CrossOriginScript_FailedCors) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AddModule_CrossOriginScript_Success) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
CreateWorkletAndSubframe_AddModule_CrossOriginScript) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageBrowserTest,
AddModule_CrossOriginScript_VerifyDataOrigin) { … }
INSTANTIATE_TEST_SUITE_P(…);
class SharedStorageAllowURNsInIframesBrowserTest
: public SharedStorageBrowserTestBase,
public testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(SharedStorageAllowURNsInIframesBrowserTest,
RenderSelectURLResultInIframe) { … }
INSTANTIATE_TEST_SUITE_P(…);
class SharedStorageFencedFrameInteractionBrowserTestBase
: public SharedStorageBrowserTestBase { … };
class SharedStorageFencedFrameInteractionBrowserTest
: public SharedStorageFencedFrameInteractionBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_FinishBeforeStartingFencedFrameNavigation) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_FinishAfterStartingFencedFrameNavigation) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_URNLifetime) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_NotFinishBeforeKeepAliveTimeout) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_WorkletReturnInvalidIndex) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_DuplicateUrl) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
FencedFrameNavigateSelf_NoBudgetWithdrawal) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
FencedFrameNavigateTop_BudgetWithdrawal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameInteractionBrowserTest,
FencedFrameNavigateFromParentToRegularURLAndThenOpenPopup_NoBudgetWithdrawal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameInteractionBrowserTest,
FencedFrameNavigateSelfAndThenNavigateTop_BudgetWithdrawal) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
DISABLED_NestedFencedFrameNavigateTop_BudgetWithdrawal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameInteractionBrowserTest,
NestedFencedFrameNavigateTop_BudgetWithdrawalFromTwoMetadata) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameInteractionBrowserTest,
SharedStorageNotAllowedInFencedFrameNotOriginatedFromSharedStorage) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURLNotAllowedInNestedFencedFrame) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
IframeInFencedFrameNavigateTop_BudgetWithdrawal) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
FencedFrame_PopupTwice_BudgetWithdrawalOnce) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameInteractionBrowserTest,
TwoFencedFrames_DifferentURNs_EachPopupOnce_BudgetWithdrawalTwice) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameInteractionBrowserTest,
TwoFencedFrames_SameURNs_EachPopupOnce_BudgetWithdrawalOnce) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_InsufficientBudget) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameInteractionBrowserTest,
SelectURL_Fails_ExceedNumOfUrnMappingsLimit) { … }
class SharedStorageFencedFrameDocumentGetBrowserTest
: public SharedStorageFencedFrameInteractionBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameDocumentGetBrowserTest,
GetAllowedInNetworkRestrictedFencedFrame) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameDocumentGetBrowserTest,
GetRejectsInFencedFrameWithoutRestrictedNetwork) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameDocumentGetBrowserTest,
GetInFencedFrameOnlyFetchesValuesFromCurrentOrigin) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameDocumentGetBrowserTest,
GetRejectsInMainFrame) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameDocumentGetBrowserTest,
GetRejectsInIFrame) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameDocumentGetBrowserTest,
GetAllowedInNetworkRestrictedNestedFencedFrameIfParentStillHasNetwork) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageFencedFrameDocumentGetBrowserTest,
GetNotAllowedInSandboxedIframeInFencedFrameTree) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageFencedFrameDocumentGetBrowserTest,
GetNotAllowedInNetworkRestrictedParentFencedFrameIfChildStillHasNetwork) { … }
class SharedStorageSelectURLNotAllowedInFencedFrameBrowserTest
: public SharedStorageFencedFrameInteractionBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SharedStorageSelectURLNotAllowedInFencedFrameBrowserTest,
SelectURLNotAllowedInFencedFrame) { … }
class SharedStorageReportEventBrowserTest
: public SharedStorageFencedFrameInteractionBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SharedStorageReportEventBrowserTest,
SelectURL_ReportEvent) { … }
class SharedStoragePrivateAggregationDisabledBrowserTest
: public SharedStorageBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationDisabledBrowserTest,
PrivateAggregationNotDefined) { … }
class SharedStoragePrivateAggregationDisabledForSharedStorageOnlyBrowserTest
: public SharedStorageBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationDisabledForSharedStorageOnlyBrowserTest,
PrivateAggregationNotDefined) { … }
class SharedStoragePrivateAggregationEnabledBrowserTest
: public SharedStorageBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
BasicTest) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
RejectedTest) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
MultipleRequests) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
TimeoutBeforeOperationFinish) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
ContextId) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
ContextIdEmptyString) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
ContextIdMaxAllowedLength) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
ContextIdTooLong) { … }
class SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest
: public SharedStoragePrivateAggregationEnabledBrowserTest { … };
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
BasicFilteringId_Success) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
FilteringIdWithDebugMode_Success) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
NoFilteringIdSpecified_FilteringIdNull) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
ExplicitDefaultFilteringId_FilteringIdNotNull) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
MaxFilteringIdForByteSize_Success) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
FilteringIdTooBigForByteSize_Error) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
FilteringIdNegative_Error) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
NoFilteringIdWithCustomByteSize_Success) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
FilteringIdWithCustomByteSize_Success) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
MaxFilteringIdWithCustomByteSize_Success) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
TooBigFilteringIdWithCustomByteSize_Error) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
FilteringIdMaxBytesTooBig_Error) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
FilteringIdMaxBytesZero_Error) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdEnabledBrowserTest,
FilteringIdMaxBytesNegative_Error) { … }
class SharedStoragePrivateAggregationFilteringIdDisabledBrowserTest
: public SharedStoragePrivateAggregationEnabledBrowserTest { … };
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdDisabledBrowserTest,
ValidFilteringId_Ignored) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdDisabledBrowserTest,
InvalidFilteringId_Ignored) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdDisabledBrowserTest,
CustomFilteringIdMaxBytes_Ignored) { … }
IN_PROC_BROWSER_TEST_F(
SharedStoragePrivateAggregationFilteringIdDisabledBrowserTest,
InvalidFilteringIdMaxBytes_Ignored) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
PrivateAggregationPermissionsPolicyNone) { … }
IN_PROC_BROWSER_TEST_F(SharedStoragePrivateAggregationEnabledBrowserTest,
SimultaneousOperationsReportsArentBatchedTogether) { … }
class SharedStorageSelectURLLimitBrowserTest
: public SharedStorageBrowserTestBase,
public testing::WithParamInterface<std::tuple<bool, bool>> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SharedStorageSelectURLLimitBrowserTest,
SelectURL_MainFrame_SameEntropy_SiteLimitReached) { … }
IN_PROC_BROWSER_TEST_P(SharedStorageSelectURLLimitBrowserTest,
SelectURL_MainFrame_DifferentEntropy_SiteLimitReached) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageSelectURLLimitBrowserTest,
SelectURL_IframesSharingCommonSite_SameEntropy_SiteLimitReached) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageSelectURLLimitBrowserTest,
SelectURL_IframesSharingCommonSite_DifferentEntropy_SiteLimitReached) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageSelectURLLimitBrowserTest,
SelectURL_IframesDifferentSite_SameEntropy_OverallLimitNotReached) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageSelectURLLimitBrowserTest,
SelectURL_IframesDifferentSite_DifferentEntropy_OverallLimitReached) { … }
class SharedStorageContextBrowserTest
: public SharedStorageFencedFrameInteractionBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(SharedStorageContextBrowserTest,
EmbedderContextSetBeforeNavigation_Defined) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageContextBrowserTest,
EmbedderContextSetAfterNavigation_Undefined) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageContextBrowserTest,
EmbedderContextNavigateTwice_ContextUpdated) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageContextBrowserTest,
EmbedderContextExceedsLengthLimit_Truncated) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
StringRoundTrip_SetThenGet_UnpairedSurrogatesArePreserved) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
StringRoundTrip_SetThenKeys_UnpairedSurrogatesArePreserved) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
StringRoundTrip_AppendThenDelete_UnpairedSurrogatesArePreserved) { … }
IN_PROC_BROWSER_TEST_P(
SharedStorageBrowserTest,
StringRoundTrip_AppendThenEntries_UnpairedSurrogatesArePreserved) { … }
class SharedStorageHeaderObserverBrowserTest
: public SharedStorageBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_SameOrigin_PermissionsDefault_ClearSetAppend) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_SameOrigin_PermissionsNone) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_SameOrigin_PermissionsAll_ClearSetAppend) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_SameOrigin_PermissionsSelf_ClearSetAppend) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_PermissionsDefault_ClearSetAppend) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_PermissionsNone) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_PermissionsAll_ClearSetAppend) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_PermissionsSelf) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteInitial) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteFinal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteBoth) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_Redirect_InititalAllowed_FinalDenied) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_Redirect_InititalAllowed_IntermediateDenied_FinalAllowed_WriteInitialAndFinal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Fetch_CrossOrigin_Redirect_InitialDenied_FinalAllowed_WriteFinal) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_SameOrigin_PermissionsDefault_VerifyDelete) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_SameOrigin_PermissionsDefault_VerifyClear) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Fetch_SameOrigin_PermissionsDefault_MultipleSet_Bytes) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
NetworkServiceRestarts_HeaderObserverContinuesWorking) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
InvalidHeader_NoOperationsInvoked) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
ParsableUnrecognizedItemSkipped_RecognizedOperationsInvoked) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
ExtraParametersIgnored) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
KeyOrValueLengthInvalid_ItemSkipped) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_SameOrigin_PermissionsDefault) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_SameOrigin_PermissionsNone) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_SameOrigin_PermissionsAll) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_SameOrigin_PermissionsSelf) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_PermissionsDefault) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_PermissionsNone) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_PermissionsAll) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_PermissionsSelf) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteInitial) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteFinal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteBoth) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_Redirect_InititalAllowed_FinalDenied) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_Redirect_InititalAllowed_IntermediateDenied_FinalAllowed_WriteInitialAndFinal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Image_CrossOrigin_Redirect_InitialDenied_FinalAllowed_WriteFinal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Image_ContentAttributeIncluded_Set_2ndImageCached_NotSet) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Image_ContentAttributeNotIncluded_NotSet) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_SameOrigin_PermissionsDefault) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_SameOrigin_PermissionsNone) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_SameOrigin_PermissionsAll) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_SameOrigin_PermissionsSelf) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_PermissionsDefault) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_PermissionsNone) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_PermissionsAll) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_PermissionsSelf) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteInitial) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteFinal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_Redirect_InititalAllowed_FinalAllowed_WriteBoth) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_Redirect_InititalAllowed_FinalDenied) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_Redirect_InititalAllowed_IntermediateDenied_FinalAllowed_WriteInitialAndFinal) { … }
IN_PROC_BROWSER_TEST_F(
SharedStorageHeaderObserverBrowserTest,
Iframe_CrossOrigin_Redirect_InitialDenied_FinalAllowed_WriteFinal) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_ContentAttributeIncluded_Set) { … }
IN_PROC_BROWSER_TEST_F(SharedStorageHeaderObserverBrowserTest,
Iframe_ContentAttributeNotIncluded_NotSet) { … }
}