use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector07.
public void testSelector07() {
ICSSSelectorList list = createSelectorList("*[lang=fr]");
checkSelectorList(list, "*[lang=fr]", 1, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "*[lang=fr]", 1, 100, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "*", true, 1, 0, 0, 0);
checkSimpleSelectorAttributes(item, new String[] { "lang=fr" });
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector23.
public void testSelector23() {
ICSSSelectorList list = createSelectorList("* > A:first-child");
checkSelectorList(list, "* > A:first-child", 1, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "* > A:first-child", 3, 101, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "*", true, 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[] { "first-child" });
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector33.
public void testSelector33() {
ICSSSelectorList list = createSelectorList(".123");
checkSelectorList(list, ".123", 1, 1);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, ".123", 1, 100, 1);
item = selector.getItem(0);
checkSimpleSelector(item, "", true, 0, 1, 0, 0);
checkSimpleSelectorClasses(item, new String[] { "123" });
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector15.
public void testSelector15() {
ICSSSelectorList list = createSelectorList("BODY > P");
checkSelectorList(list, "BODY > P", 1, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "BODY > P", 3, 2, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "BODY", false, 0, 0, 0, 0);
item = selector.getItem(1);
checkSelectorCombinator(item, ">", ICSSSelectorCombinator.CHILD);
item = selector.getItem(2);
checkSimpleSelector(item, "P", 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 testSelector18.
public void testSelector18() {
ICSSSelectorList list = createSelectorList("H1.opener + H2");
checkSelectorList(list, "H1.opener + H2", 1, 0);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, "H1.opener + H2", 3, 102, 0);
item = selector.getItem(0);
checkSimpleSelector(item, "H1", false, 0, 1, 0, 0);
checkSimpleSelectorClasses(item, new String[] { "opener" });
item = selector.getItem(1);
checkSelectorCombinator(item, "+", ICSSSelectorCombinator.ADJACENT);
item = selector.getItem(2);
checkSimpleSelector(item, "H2", false, 0, 0, 0, 0);
}
Aggregations