use of com.googlecode.gwt.test.exceptions.GwtTestDomException in project gwt-test-utils by gwt-test-utils.
the class DocumentPatcher method nativeGet.
@PatchMethod
static Document nativeGet() {
if (DOCUMENT_HOLDER.document == null) {
try {
DOCUMENT_HOLDER.document = JsoUtils.newDocument();
Element e = parseHTMLElement(DOCUMENT_HOLDER.document);
DOCUMENT_HOLDER.document.appendChild(e);
JavaScriptObjects.setProperty(DOCUMENT_HOLDER.document, DOCUMENT_ELEMENT, e);
return DOCUMENT_HOLDER.document;
} catch (Exception e) {
if (GwtTestException.class.isInstance(e)) {
throw (GwtTestException) e;
} else {
throw new GwtTestDomException("Unable to create Document", e);
}
}
}
return DOCUMENT_HOLDER.document;
}
Aggregations