|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.w3c.mwi.mobileok.basic.AbstractTestImplementation
org.w3c.mwi.mobileok.basic.AbstractCSSTestImplementation
abstract class AbstractCSSTestImplementation
Abstract implementation of AbstractTestImplementation that provides
helper methods to parse the CSS styles (whether inline, embedded or external)
defined in the Web resource under test.
| Nested Class Summary | |
|---|---|
(package private) static class |
AbstractCSSTestImplementation.TestErrorInfo
|
| Field Summary | |
|---|---|
private static javax.xml.xpath.XPathExpression |
DOC_CONTENT_EXPR
XPath expression to extract the content of the (potentially tidied) XHTML resource under test in a moki representation of
a resource. |
private static javax.xml.xpath.XPathExpression |
EMBEDDED_STYLESHEETS_EXPR
XPath expression to extract the content of the embedded CSS styles in a moki representation of a resource. |
private static javax.xml.xpath.XPathExpression |
EXTERNAL_STYLESHEETS_EXPR
XPath expression to extract the content of the external CSS stylesheets in a moki representation of a resource. |
private static javax.xml.xpath.XPathExpression |
EXTERNAL_STYLESHEETS_URI_EXPR
XPath expression to extract the final URI of the external CSS stylesheets in a moki representation of a resource. |
private static javax.xml.xpath.XPathExpression |
INLINE_STYLE_EXPR
XPath expression to extract the content of the CSS styles declared inline in a moki representation of a resource. |
private static javax.xml.xpath.XPathExpression |
PRIMARY_DOC_URI_EXPR
XPath expression to extract the final URI of the primary document in a moki representation of a resource. |
| Constructor Summary | |
|---|---|
AbstractCSSTestImplementation()
|
|
| Method Summary | |
|---|---|
(package private) abstract void |
addSubResultsToResultsDocument(org.w3c.dom.Document testResults,
org.w3c.dom.Element test,
java.util.List<AbstractCSSTestImplementation.TestErrorInfo> measuresErrors)
|
(package private) void |
addSubResultsToResultsDocument(org.w3c.dom.Document testResults,
org.w3c.dom.Node test,
java.lang.Iterable<AbstractCSSTestImplementation.TestErrorInfo> cssErrors,
java.lang.String resultName,
java.lang.String resultOutcome,
java.lang.String infoString)
|
private java.util.List<AbstractCSSTestImplementation.TestErrorInfo> |
evaluateCSSErrors(java.lang.String cssContent,
java.lang.String uri,
int lineOffset)
Parses given CSS styles searching for test errors. |
(package private) abstract java.util.List<AbstractCSSTestImplementation.TestErrorInfo> |
findTestErrors(java.lang.String line)
|
private org.w3c.dom.Document |
generateResultsOnCSSContent(PreprocessorResults results)
|
private static int |
getDocContentLineNumber(org.w3c.dom.Document moki)
|
TestResult |
runTest(PreprocessorResults results)
|
| Methods inherited from class org.w3c.mwi.mobileok.basic.AbstractTestImplementation |
|---|
convertToTestResult, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.mwi.mobileok.basic.TestImplementation |
|---|
getTestType |
| Field Detail |
|---|
private static final javax.xml.xpath.XPathExpression EXTERNAL_STYLESHEETS_EXPR
moki representation of a resource.
private static final javax.xml.xpath.XPathExpression EXTERNAL_STYLESHEETS_URI_EXPR
moki representation of a resource.
private static final javax.xml.xpath.XPathExpression PRIMARY_DOC_URI_EXPR
moki representation of a resource.
private static final javax.xml.xpath.XPathExpression EMBEDDED_STYLESHEETS_EXPR
moki representation of a resource.
private static final javax.xml.xpath.XPathExpression INLINE_STYLE_EXPR
moki representation of a resource.
private static final javax.xml.xpath.XPathExpression DOC_CONTENT_EXPR
moki representation of
a resource.
| Constructor Detail |
|---|
AbstractCSSTestImplementation()
| Method Detail |
|---|
public TestResult runTest(PreprocessorResults results)
throws TestException
TestException
private org.w3c.dom.Document generateResultsOnCSSContent(PreprocessorResults results)
throws TestException
TestException
private static int getDocContentLineNumber(org.w3c.dom.Document moki)
throws TestException
TestException
private java.util.List<AbstractCSSTestImplementation.TestErrorInfo> evaluateCSSErrors(java.lang.String cssContent,
java.lang.String uri,
int lineOffset)
throws TestException
cssContent - CSS styles to parse.uri - URI of the resource that contains the CSS styles being parsed.lineOffset - line offset of the starting line of the CSS styles in the resource.
TestException - an unexpected error occurred.abstract java.util.List<AbstractCSSTestImplementation.TestErrorInfo> findTestErrors(java.lang.String line)
abstract void addSubResultsToResultsDocument(org.w3c.dom.Document testResults,
org.w3c.dom.Element test,
java.util.List<AbstractCSSTestImplementation.TestErrorInfo> measuresErrors)
void addSubResultsToResultsDocument(org.w3c.dom.Document testResults,
org.w3c.dom.Node test,
java.lang.Iterable<AbstractCSSTestImplementation.TestErrorInfo> cssErrors,
java.lang.String resultName,
java.lang.String resultOutcome,
java.lang.String infoString)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||