#ifndef CHROME_BROWSER_UI_WEB_APPLICATIONS_TEST_ISOLATED_WEB_APP_TEST_UTILS_H_
#define CHROME_BROWSER_UI_WEB_APPLICATIONS_TEST_ISOLATED_WEB_APP_TEST_UTILS_H_
#include <memory>
#include <string>
#include <string_view>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/threading/thread_restrictions.h"
#include "base/version.h"
#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_source.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_storage_location.h"
#include "chrome/browser/web_applications/web_app.h"
#include "components/version_info/channel.h"
#include "components/webapps/browser/installable/installable_metrics.h"
#include "extensions/common/features/feature_channel.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/base/window_open_disposition.h"
class Browser;
class GURL;
class Profile;
namespace content {
class RenderFrameHost;
}
namespace net::test_server {
class EmbeddedTestServer;
}
namespace url {
class Origin;
}
namespace web_app {
class IsolatedWebAppUrlInfo;
class IsolatedWebAppBrowserTestHarness : public WebAppBrowserTestBase { … };
std::unique_ptr<net::EmbeddedTestServer> CreateAndStartDevServer(
const base::FilePath::StringPieceType& chrome_test_data_relative_root);
IsolatedWebAppUrlInfo InstallDevModeProxyIsolatedWebApp(
Profile* profile,
const url::Origin& proxy_origin);
content::RenderFrameHost* OpenIsolatedWebApp(Profile* profile,
const webapps::AppId& app_id,
std::string_view path = "");
void CreateIframe(content::RenderFrameHost* parent_frame,
const std::string& iframe_id,
const GURL& url,
const std::string& permissions_policy);
webapps::AppId AddDummyIsolatedAppToRegistry(
Profile* profile,
const GURL& start_url,
const std::string& name,
const WebApp::IsolationData& isolation_data = WebApp::IsolationData(
IwaStorageOwnedBundle{ … };
void SimulateIsolatedWebAppNavigation(content::WebContents* web_contents,
const GURL& url);
void CommitPendingIsolatedWebAppNavigation(content::WebContents* web_contents);
namespace test {
namespace {
AllOf;
ExplainMatchResult;
Field;
Optional;
Pointee;
Property;
}
MATCHER_P(IsInIwaRandomDir, profile_directory, "") { … }
MATCHER(FileExists, "") { … }
MATCHER_P(OwnedIwaBundleExists, profile_directory, "") { … }
MATCHER_P2(IwaIs, untranslated_name, isolation_data, "") { … }
MATCHER_P5(IsolationDataIs,
location,
version,
controlled_frame_partitions,
pending_update_info,
integrity_block_data,
"") { … }
MATCHER_P3(PendingUpdateInfoIs, location, version, integrity_block_data, "") { … }
}
}
#endif