chromium/extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/browser/api/declarative_webrequest/webrequest_condition.h"

#include <memory>
#include <set>

#include "base/test/values_test_util.h"
#include "base/values.h"
#include "components/url_matcher/url_matcher_constants.h"
#include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
#include "extensions/browser/api/web_request/web_request_info.h"
#include "services/network/public/mojom/fetch_api.mojom-shared.h"
#include "testing/gtest/include/gtest/gtest.h"

URLMatcher;
URLMatcherConditionSet;

namespace extensions {

TEST(WebRequestConditionTest, CreateCondition) {}

TEST(WebRequestConditionTest, IgnoreConditionFirstPartyForCookies) {}

TEST(WebRequestConditionTest, IgnoreConditionThirdPartForCookies) {}

// Conditions without UrlFilter attributes need to be independent of URL
// matching results. We test here that:
//   1. A non-empty condition without UrlFilter attributes is fulfilled iff its
//      attributes are fulfilled.
//   2. An empty condition (in particular, without UrlFilter attributes) is
//      always fulfilled.
TEST(WebRequestConditionTest, NoUrlAttributes) {}

TEST(WebRequestConditionTest, CreateConditionSet) {}

TEST(WebRequestConditionTest, TestPortFilter) {}

// Create a condition with two attributes: one on the request header and one on
// the response header. The Create() method should fail and complain that it is
// impossible that both conditions are fulfilled at the same time.
TEST(WebRequestConditionTest, ConditionsWithConflictingStages) {}

}  // namespace extensions