#include "chrome/browser/trusted_vault/trusted_vault_encryption_keys_tab_helper.h"
#include "base/memory/scoped_refptr.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/signin/test_signin_client_builder.h"
#include "chrome/browser/trusted_vault/trusted_vault_service_factory.h"
#include "chrome/common/trusted_vault_encryption_keys_extension.mojom.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/site_isolation/features.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/site_isolation_policy.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
namespace {
class TrustedVaultEncryptionKeysTabHelperTest
: public ChromeRenderViewHostTestHarness { … };
TEST_F(TrustedVaultEncryptionKeysTabHelperTest,
ShouldExposeMojoApiToAllowedOrigin) { … }
TEST_F(TrustedVaultEncryptionKeysTabHelperTest,
ShouldNotExposeMojoApiToUnallowedOrigin) { … }
TEST_F(TrustedVaultEncryptionKeysTabHelperTest,
DISABLED_ShouldNotExposeMojoApiIfNavigatedAway) { … }
TEST_F(TrustedVaultEncryptionKeysTabHelperTest,
ShouldExposeMojoApiEvenIfSubframeNavigatedAway) { … }
TEST_F(TrustedVaultEncryptionKeysTabHelperTest,
ShouldNotExposeMojoApiIfNavigationFailed) { … }
TEST_F(TrustedVaultEncryptionKeysTabHelperTest,
DISABLED_ShouldNotExposeMojoApiIfNavigatedAwayToErrorPage) { … }
class TrustedVaultEncryptionKeysTabHelperPrerenderingTest
: public TrustedVaultEncryptionKeysTabHelperTest { … };
TEST_F(TrustedVaultEncryptionKeysTabHelperPrerenderingTest,
CreateEncryptionKeysInPrerendering) { … }
}