#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_TEST_HELPERS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_TEST_HELPERS_H_
#include <optional>
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/css/css_selector.h"
#include "third_party/blink/renderer/core/css/css_selector_list.h"
#include "third_party/blink/renderer/core/css/rule_set.h"
#include "third_party/blink/renderer/core/testing/null_execution_context.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
namespace blink {
class Document;
class CSSStyleSheet;
class CSSVariableData;
class CSSValue;
class CSSProperty;
class PropertyRegistration;
namespace css_test_helpers {
class TestStyleSheet { … };
CSSStyleSheet* CreateStyleSheet(Document& document);
RuleSet* CreateRuleSet(Document& document, String text);
PropertyRegistration* CreatePropertyRegistration(
const String& name,
String syntax = "*",
const CSSValue* initial_value = nullptr,
bool is_inherited = false);
PropertyRegistration* CreateLengthRegistration(const String& name, int px);
void RegisterProperty(Document& document,
const String& name,
const String& syntax,
const std::optional<String>& initial_value,
bool is_inherited);
void RegisterProperty(Document& document,
const String& name,
const String& syntax,
const std::optional<String>& initial_value,
bool is_inherited,
ExceptionState&);
void DeclareProperty(Document& document,
const String& name,
const String& syntax,
const std::optional<String>& initial_value,
bool is_inherited);
CSSVariableData* CreateVariableData(String);
const CSSValue* CreateCustomIdent(const char*);
const CSSValue* ParseLonghand(Document& document,
const CSSProperty&,
const String& value);
const CSSPropertyValueSet* ParseDeclarationBlock(
const String& block_text,
CSSParserMode mode = kHTMLStandardMode);
StyleRuleBase* ParseRule(Document& document, String text);
const CSSValue* ParseValue(Document&, String syntax, String value);
CSSSelectorList* ParseSelectorList(const String&);
CSSSelectorList* ParseSelectorList(const String&,
CSSNestingType,
const StyleRule* parent_rule_for_nesting,
bool is_within_scope);
}
}
#endif