#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/apps/platform_apps/app_browsertest_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/embedder_support/switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_base.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/prerender_test_util.h"
#include "extensions/test/extension_test_message_listener.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/base/page_transition_types.h"
namespace extensions {
class PlatformAppNavigationRedirectorBrowserTest
: public PlatformAppBrowserTest { … };
void PlatformAppNavigationRedirectorBrowserTest::SetUpCommandLine(
base::CommandLine* command_line) { … }
void PlatformAppNavigationRedirectorBrowserTest::TestNavigationInTab(
const char* launcher_page,
const char* handler,
const char* handler_start_message) { … }
void PlatformAppNavigationRedirectorBrowserTest::TestMismatchingNavigationInTab(
const char* launcher_page,
const char* success_tab_title,
const char* handler) { … }
void PlatformAppNavigationRedirectorBrowserTest::TestNegativeXhrInTab(
const char* launcher_page,
const char* success_tab_title,
const char* failure_tab_title,
const char* handler) { … }
void PlatformAppNavigationRedirectorBrowserTest::TestNavigationInApp(
const char* launcher,
const char* launcher_done_message,
const char* handler,
const char* handler_start_message) { … }
void PlatformAppNavigationRedirectorBrowserTest::TestNegativeNavigationInApp(
const char* launcher,
const char* launcher_done_message,
const char* handler) { … }
void PlatformAppNavigationRedirectorBrowserTest::TestMismatchingNavigationInApp(
const char* launcher,
const char* launcher_done_message,
const char* handler) { … }
void PlatformAppNavigationRedirectorBrowserTest::TestNavigationInBrowser(
const char* matching_target_page,
ui::PageTransition transition,
const char* handler,
const char* handler_start_message) { … }
void PlatformAppNavigationRedirectorBrowserTest::
TestNegativeNavigationInBrowser(const char* matching_target_page,
ui::PageTransition transition,
const char* success_tab_title,
const char* handler) { … }
void PlatformAppNavigationRedirectorBrowserTest::
TestMismatchingNavigationInBrowser(const char* mismatching_target_page,
ui::PageTransition transition,
const char* success_tab_title,
const char* handler) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
ClickInTabIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
BlankClickInTabIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
WindowOpenInTabIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
MismatchingClickInTabNotIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
BlankClickInAppIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
WindowOpenInAppIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
MismatchingWindowOpenInAppNotIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
WebviewNavigationNotIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
MismatchingBlankClickInAppNotIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
EntryInOmnibarIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
MismatchingEntryInOmnibarNotIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
FormSubmissionInTabNotIntercepted) { … }
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorBrowserTest,
XhrInTabNotIntercepted) { … }
class PlatformAppNavigationRedirectorPrerenderingBrowserTest
: public PlatformAppNavigationRedirectorBrowserTest { … };
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorPrerenderingBrowserTest,
DoNotLaunchAppInPrerendering) { … }
class PlatformAppNavigationRedirectorFencedFrameBrowserTest
: public PlatformAppNavigationRedirectorBrowserTest { … };
IN_PROC_BROWSER_TEST_F(PlatformAppNavigationRedirectorFencedFrameBrowserTest,
DoNotLaunchAppInFencedFrames) { … }
}