This source file includes following definitions.
- TEST
#include "config.h"
#include "core/css/CSSTestHelper.h"
#include "core/css/RuleSet.h"
#include <gtest/gtest.h>
namespace WebCore {
TEST(CSSSelector, Representations)
{
CSSTestHelper helper;
const char* cssRules =
"summary::-webkit-details-marker { }"
"* {}"
"div {}"
"#id {}"
".class {}"
"[attr] {}"
"div:hover {}"
"div:nth-child(2){}"
".class#id { }"
"#id.class { }"
"[attr]#id { }"
"div[attr]#id { }"
"div::content { }"
"div::first-line { }"
".a.b.c { }"
"div:not(.a) { }"
"div:not(:visited) { }"
"[attr=\"value\"] { }"
"[attr~=\"value\"] { }"
"[attr^=\"value\"] { }"
"[attr$=\"value\"] { }"
"[attr*=\"value\"] { }"
"[attr|=\"value\"] { }"
".a .b { }"
".a > .b { }"
".a ~ .b { }"
".a + .b { }"
".a, .b { }"
".a.b .c {}";
helper.addCSSRules(cssRules);
EXPECT_EQ(30u, helper.ruleSet().ruleCount());
#ifndef NDEBUG
helper.ruleSet().show();
#endif
}
}