#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
#include "chrome/browser/ui/web_applications/test/ssl_test_utils.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h"
#include "chrome/browser/ui/web_applications/web_app_launch_utils.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/request_handler_util.h"
#include "third_party/blink/public/common/features.h"
#include "url/gurl.h"
namespace {
constexpr const char kImagePath[] = …;
std::string GetPathWithHostAndPortReplaced(
const std::string& original_path,
const net::HostPortPair& host_port_pair) { … }
bool TryToLoadImage(const content::ToRenderFrameHost& adapter,
const GURL& image_url) { … }
}
namespace web_app {
class PWAMixedContentBrowserTest : public WebAppBrowserTestBase { … };
class PWAMixedContentBrowserTestWithAutoupgradesDisabled
: public PWAMixedContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(PWAMixedContentBrowserTest,
ShortcutMenuOptionsForNonInstallableSite) { … }
IN_PROC_BROWSER_TEST_F(PWAMixedContentBrowserTestWithAutoupgradesDisabled,
MixedContentInPWA) { … }
IN_PROC_BROWSER_TEST_F(PWAMixedContentBrowserTestWithAutoupgradesDisabled,
MixedContentOpenInChrome) { … }
IN_PROC_BROWSER_TEST_F(PWAMixedContentBrowserTestWithAutoupgradesDisabled,
MixedContentReparentWebContentsIntoAppBrowser) { … }
IN_PROC_BROWSER_TEST_F(PWAMixedContentBrowserTest, IFrameMixedContentInPWA) { … }
IN_PROC_BROWSER_TEST_F(
PWAMixedContentBrowserTestWithAutoupgradesDisabled,
IFrameDynamicMixedContentInPWAReparentWebContentsIntoAppBrowser) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \
defined(ADDRESS_SANITIZER)
#define MAYBE_IFrameDynamicMixedContentInPWAOpenInChrome …
#else
#define MAYBE_IFrameDynamicMixedContentInPWAOpenInChrome …
#endif
IN_PROC_BROWSER_TEST_F(PWAMixedContentBrowserTestWithAutoupgradesDisabled,
MAYBE_IFrameDynamicMixedContentInPWAOpenInChrome) { … }
}