Skip to content

.only cannot be used as a class name selector #36

Closed
@daniel-beck

Description

@daniel-beck

Failing test:

$ git diff
diff --git a/src/test/java/org/htmlunit/cssparser/parser/CSS3ParserTest.java b/src/test/java/org/htmlunit/cssparser/parser/CSS3ParserTest.java
index e5386a7..f7240ae 100644
--- a/src/test/java/org/htmlunit/cssparser/parser/CSS3ParserTest.java
+++ b/src/test/java/org/htmlunit/cssparser/parser/CSS3ParserTest.java
@@ -85,6 +85,7 @@ public void selectorList() throws Exception {
      */
     @Test
     public void selector() throws Exception {
+        selectorType(".only", SelectorType.ELEMENT_NODE_SELECTOR);
         selectorType("a#id.class:link", SelectorType.ELEMENT_NODE_SELECTOR);
         selectorType("a#id.class", SelectorType.ELEMENT_NODE_SELECTOR);
         selectorType("a#id:link", SelectorType.ELEMENT_NODE_SELECTOR);
@@ -207,6 +208,7 @@ public void selectorLangInvalid() throws Exception {
      */
     @Test
     public void condition() throws Exception {
+        conditionType(".only", ConditionType.CLASS_CONDITION);
         conditionType("a#id.class:link", ConditionType.ID_CONDITION, ConditionType.CLASS_CONDITION,
                 ConditionType.PSEUDO_CLASS_CONDITION);
         conditionType("a#id.class", ConditionType.ID_CONDITION, ConditionType.CLASS_CONDITION);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions