#include "content/common/service_worker/service_worker_router_evaluator.h"
#include <string_view>
#include <vector>
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/safe_url_pattern.h"
#include "third_party/blink/public/common/service_worker/embedded_worker_status.h"
#include "third_party/blink/public/common/service_worker/service_worker_router_rule.h"
#include "third_party/liburlpattern/parse.h"
#include "third_party/liburlpattern/pattern.h"
namespace content {
namespace {
blink::SafeUrlPattern DefaultURLPattern() { … }
std::string ParseEncodeCallback(std::string_view input) { … }
TEST(ServiceWorkerRouterEvaluator, EmptyRule) { … }
TEST(ServiceWorkerRouterEvaluator, SimpleMatch) { … }
TEST(ServiceWorkerRouterEvaluator, SimpleExactMatch) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingCondition) { … }
TEST(ServiceWorkerRouterEvaluator, OneConditionMisMatch) { … }
TEST(ServiceWorkerRouterEvaluator, AllConditionMatch) { … }
TEST(ServiceWorkerRouterEvaluator, ChooseMatchedRoute) { … }
TEST(ServiceWorkerRouterEvaluator, SimpleHostnameMatch) { … }
TEST(ServiceWorkerRouterEvaluator, SimpleExactHostnameMatch) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingHostnameCondition) { … }
TEST(ServiceWorkerRouterEvaluator, MatchingVariousCondition) { … }
TEST(ServiceWorkerRouterEvaluator, MatchingDefaultURLPattern) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingProtocol) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingUsername) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingPassword) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingPort) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingSearch) { … }
TEST(ServiceWorkerRouterEvaluator, NotMatchingHash) { … }
TEST(ServiceWorkerRouterEvaluator, SimpleIgnoreCaseMatch) { … }
TEST(ServiceWorkerRouterEvaluator, SimpleRespectCaseAndMismatch) { … }
TEST(ServiceWorkerRouterEvaluator, EmptyCondition) { … }
TEST(ServiceWorkerRouterEvaluator, EmptySource) { … }
TEST(ServiceWorkerRouterEvaluator, InvalidSource) { … }
TEST(ServiceWorkerRouterEvaluator, RequestMatch) { … }
TEST(ServiceWorkerRouterEvaluator, RunningStatusMatch) { … }
TEST(ServiceWorkerRouterEvaluator, EmptyOrConditionAlwaysUnMatch) { … }
TEST(ServiceWorkerRouterEvaluator, OrConditionMatch) { … }
TEST(ServiceWorkerRouterEvaluator, NotConditionMatch) { … }
TEST(ServiceWorkerRouterEvaluator, NotConditionMatchNested) { … }
blink::ServiceWorkerRouterCondition generateNestedNotCondition(int depth) { … }
TEST(ServiceWorkerRouterEvaluator, NotConditionShouldNotExceedMaxDepth) { … }
TEST(ServiceWorkerRouterEvaluator, ToValueEmptyRule) { … }
TEST(ServiceWorkerRouterEvaluator, ToValueBasicSimpleRule) { … }
TEST(ServiceWorkerRouterEvaluator, ToValueEmptyOrCondition) { … }
TEST(ServiceWorkerRouterEvaluator, ToValueNestedOrCondition) { … }
TEST(ServiceWorkerRouterEvaluator, ToValueNotCondition) { … }
TEST(ServiceWorkerRouterEvaluator, ToValueUrlPatternWithFields) { … }
TEST(ServiceWorkerRouterEvaluator, ToValueUrlPatternWithoutFields) { … }
}
}