#include "base/strings/strcat.h"
#include "base/test/bind.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/content_switches.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/test_navigation_observer.h"
#include "content/public/test/url_loader_interceptor.h"
#include "content/shell/browser/shell.h"
#include "content/shell/common/shell_switches.h"
URLLoaderInterceptor;
namespace {
constexpr char kBaseDataDir[] = …;
void NavigateViaRenderer(content::WebContents* web_contents, const GURL& url) { … }
}
namespace content {
class OriginTrialsBrowserTest : public content::ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(OriginTrialsBrowserTest, Basic) { … }
IN_PROC_BROWSER_TEST_F(OriginTrialsBrowserTest,
NonNavigationTrialNotActivatedAcrossNavigations) { … }
IN_PROC_BROWSER_TEST_F(OriginTrialsBrowserTest, Navigation) { … }
IN_PROC_BROWSER_TEST_F(OriginTrialsBrowserTest,
NavigationTrialActivatedAcrossNavigations) { … }
const char kCallWorkerScript[] = …;
class ForceEnabledOriginTrialsBrowserTest
: public OriginTrialsBrowserTest,
public testing::WithParamInterface<bool>,
public WebContentsObserver { … };
IN_PROC_BROWSER_TEST_P(ForceEnabledOriginTrialsBrowserTest,
ForceEnabledOriginTrials_MainPage) { … }
IN_PROC_BROWSER_TEST_P(ForceEnabledOriginTrialsBrowserTest,
ForceEnabledOriginTrials_IframeInPage) { … }
IN_PROC_BROWSER_TEST_P(ForceEnabledOriginTrialsBrowserTest,
ForceEnabledOriginTrials_InjectedIframe) { … }
INSTANTIATE_TEST_SUITE_P(…);
}