#include "third_party/blink/public/common/manifest/manifest.h"
#include <stdint.h>
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/browser/page.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.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/fenced_frame_test_util.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/shell/browser/shell.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/manifest/manifest_util.h"
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom.h"
#include "third_party/blink/public/mojom/manifest/manifest_manager.mojom.h"
namespace content {
namespace {
Contains;
HasSubstr;
}
class ManifestBrowserTest;
class MockWebContentsDelegate : public WebContentsDelegate { … };
class ManifestBrowserTest : public ContentBrowserTest,
public WebContentsObserver { … };
bool MockWebContentsDelegate::DidAddMessageToConsole(
WebContents* source,
blink::mojom::ConsoleMessageLevel log_level,
const std::u16string& message,
int32_t line_no,
const std::u16string& source_id) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, NoManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, 404Manifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, EmptyManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, ParseErrorManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, SampleManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, DynamicManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, FileHandlerManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, DISABLED_CorsManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, CorsManifestWithAcessControls) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, DISABLED_MixedContentManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, ParsingErrorsManifest) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, Navigation) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, PushStateNavigation) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, AnchorNavigation) { … }
namespace {
std::unique_ptr<net::test_server::HttpResponse> CustomHandleRequestForCookies(
const net::test_server::HttpRequest& request) { … }
}
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, UseCredentialsSendCookies) { … }
namespace {
std::unique_ptr<net::test_server::HttpResponse> CustomHandleRequestForNoCookies(
const net::test_server::HttpRequest& request) { … }
}
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, NoUseCredentialsNoCookies) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest, UniqueOrigin) { … }
IN_PROC_BROWSER_TEST_F(ManifestBrowserTest,
GetManifestInterruptedByDestruction) { … }
class ManifestBrowserPrerenderingTest : public ManifestBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ManifestBrowserPrerenderingTest,
GetManifestInPrerendering) { … }
class ManifestFencedFrameBrowserTest : public ManifestBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ManifestFencedFrameBrowserTest,
GetManifestInFencedFrame) { … }
}