* of the test's internal operation fails.
*/
public TestReport runImpl() throws Exception {
DefaultTestReport report = new DefaultTestReport(this);
SVGDocument svgDoc;
GraphicsNode gvtRoot;
BridgeContext ctx;
try {
UserAgent userAgent = new UserAgentAdapter();
DocumentLoader loader = new DocumentLoader(userAgent);
GVTBuilder builder = new GVTBuilder();
ctx = new BridgeContext(userAgent, loader);
svgDoc = (SVGDocument)loader.loadDocument(svg.toString());
gvtRoot = builder.build(ctx, svgDoc);
} catch(Exception e) {
StringWriter trace = new StringWriter();
e.printStackTrace(new PrintWriter(trace));
report.setErrorCode(ERROR_READING_SVG);
report.setDescription(new TestReport.Entry[] {
new TestReport.Entry
(Messages.formatMessage(ENTRY_KEY_ERROR_DESCRIPTION, null),
Messages.formatMessage
(ERROR_READING_SVG,
new String[]{svg.toString(), trace.toString()}))
});
report.setPassed(false);
return report;
}
Shape highlight = null;
try {
Element e = svgDoc.getElementById(id);
// System.out.println("Element: " + e + " CTX: " + ctx );
GraphicsNode gn = ctx.getGraphicsNode(e);
if (gn == null) {
report.setErrorCode(ERROR_BAD_ID);
report.setDescription(new TestReport.Entry[] {