use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector02.
// see 214416 Dot char is not escaped in XML10Names.jFlex
// for complications leading to this test being changed.
public void testSelector02() {
ICSSSelectorList list = createSelectorList("H\\\\, H\\1, H3");
checkSelectorList(list, "H\\\\, H\\1, H3", 3, 2);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "H\\\\", 1, 1, 1);
item = selector.getItem(0);
checkSimpleSelector(item, "H\\\\", false, 0, 0, 0, 0);
selector = list.getSelector(1);
checkSelector(selector, "H\\1", 1, 1, 1);
item = selector.getItem(0);
checkSimpleSelector(item, "H\\1", false, 0, 0, 0, 0);
selector = list.getSelector(2);
checkSelector(selector, "H3", 1, 1, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "H3", false, 0, 0, 0, 0);
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector28.
public void testSelector28() {
ICSSSelectorList list = createSelectorList("P > A:link, A.external:visited");
checkSelectorList(list, "P > A:link, A.external:visited", 2, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "P > A:link", 3, 102, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "P", false, 0, 0, 0, 0);
item = selector.getItem(1);
checkSelectorCombinator(item, ">", ICSSSelectorCombinator.CHILD);
item = selector.getItem(2);
checkSimpleSelector(item, "A", false, 0, 0, 0, 1);
checkSimpleSelectorPseudoNames(item, new String[] { "link" });
selector = list.getSelector(1);
checkSelector(selector, "A.external:visited", 1, 201, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "A", false, 0, 1, 0, 1);
checkSimpleSelectorClasses(item, new String[] { "external" });
checkSimpleSelectorPseudoNames(item, new String[] { "visited" });
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector19.
public void testSelector19() {
ICSSSelectorList list = createSelectorList("EXAMPLE[notation=decimal]");
checkSelectorList(list, "EXAMPLE[notation=decimal]", 1, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "EXAMPLE[notation=decimal]", 1, 101, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "EXAMPLE", false, 1, 0, 0, 0);
checkSimpleSelectorAttributes(item, new String[] { "notation=decimal" });
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector20.
public void testSelector20() {
ICSSSelectorList list = createSelectorList("SPAN[hello=\"Cleveland\"][goodbye=\"Columbus\"]");
checkSelectorList(list, "SPAN[hello=\"Cleveland\"][goodbye=\"Columbus\"]", 1, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "SPAN[hello=\"Cleveland\"][goodbye=\"Columbus\"]", 1, 201, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "SPAN", false, 2, 0, 0, 0);
checkSimpleSelectorAttributes(item, new String[] { "hello=\"Cleveland\"", "goodbye=\"Columbus\"" });
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector06.
public void testSelector06() {
ICSSSelectorList list = createSelectorList(".warning");
checkSelectorList(list, ".warning", 1, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, ".warning", 1, 100, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "", true, 0, 1, 0, 0);
checkSimpleSelectorClasses(item, new String[] { "warning" });
}
Aggregations