#include "content/browser/service_worker/service_worker_loader_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace service_worker_loader_helpers {
namespace {
bool IsPathRestrictionSatisfied(const GURL& scope, const GURL& script_url) { … }
bool IsPathRestrictionSatisfiedWithServiceWorkerAllowedHeader(
const GURL& scope,
const GURL& script_url,
const std::string& service_worker_allowed) { … }
}
TEST(ServiceWorkerLoaderHelpersTest, PathRestriction_Basic) { … }
TEST(ServiceWorkerLoaderHelpersTest, PathRestriction_SelfReference) { … }
TEST(ServiceWorkerLoaderHelpersTest, PathRestriction_ParentReference) { … }
TEST(ServiceWorkerLoaderHelpersTest, PathRestriction_ConsecutiveSlashes) { … }
TEST(ServiceWorkerLoaderHelpersTest, PathRestriction_BackSlash) { … }
TEST(ServiceWorkerLoaderHelpersTest, PathRestriction_DisallowedCharacter) { … }
TEST(ServiceWorkerLoaderHelpersTest, PathRestriction_ServiceWorkerAllowed) { … }
}
}