#include "third_party/blink/renderer/core/css/rule_set.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/core/css/css_default_style_sheets.h"
#include "third_party/blink/renderer/core/css/css_keyframes_rule.h"
#include "third_party/blink/renderer/core/css/css_rule_list.h"
#include "third_party/blink/renderer/core/css/css_test_helpers.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/html/html_style_element.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
ElementsAreArray;
namespace blink {
namespace {
StyleRule* CreateDummyStyleRule() { … }
}
TEST(RuleSetTest, findBestRuleSetAndAdd_CustomPseudoElements) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_Id) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_NthChild) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_ClassThenId) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_IdThenClass) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_AttrThenId) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_TagThenAttrThenId) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_TagThenAttr) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_ThreeClasses) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_AttrThenClass) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_Host) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_HostWithId) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_HostContext) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_HostContextWithId) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_HostAndHostContextNotInRightmost) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_HostAndClass) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_HostContextAndClass) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_Focus) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_LinkVisited) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_Cue) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_PlaceholderPseudo) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_PartPseudoElements) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_IsSingleArg) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_WhereSingleArg) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_WhereSingleArgNested) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_IsMultiArg) { … }
TEST(RuleSetTest, findBestRuleSetAndAdd_WhereMultiArg) { … }
static void AddManyAttributeRules(base::test::ScopedFeatureList& feature_list,
css_test_helpers::TestStyleSheet& sheet) { … }
TEST(RuleSetTest, LargeNumberOfAttributeRules) { … }
TEST(RuleSetTest, LargeNumberOfAttributeRulesWithEmpty) { … }
TEST(RuleSetTest, LargeNumberOfAttributeRulesWithCatchAll) { … }
TEST(RuleSetTest, LargeNumberOfAttributeRulesWithCatchAll2) { … }
#if DCHECK_IS_ON()
std::deque<bool> CoveredByBucketing(const String& selector_text,
wtf_size_t rule_index = 0) { … }
wtf_size_t RuleCount(const String& selector_text) { … }
TEST(RuleSetTest, IsCoveredByBucketing) { … }
TEST(RuleSetTest, VisitedDependentRuleCount) { … }
#endif
TEST(RuleSetTest, SelectorIndexLimit) { … }
TEST(RuleSetTest, RuleDataPositionLimit) { … }
TEST(RuleSetTest, RuleCountNotIncreasedByInvalidRuleData) { … }
TEST(RuleSetTest, NoStyleScope) { … }
TEST(RuleSetTest, StyleScope) { … }
TEST(RuleSetTest, NestedStyleScope) { … }
TEST(RuleSetTest, SingleScope) { … }
class RuleSetCascadeLayerTest : public SimTest { … };
TEST_F(RuleSetCascadeLayerTest, NoLayer) { … }
TEST_F(RuleSetCascadeLayerTest, Basic) { … }
TEST_F(RuleSetCascadeLayerTest, NestingAndFlatListName) { … }
TEST_F(RuleSetCascadeLayerTest, LayerStatementOrdering) { … }
TEST_F(RuleSetCascadeLayerTest, LayeredImport) { … }
TEST_F(RuleSetCascadeLayerTest, LayerStatementsBeforeAndAfterImport) { … }
}