public void testRepairsWherePossible() throws HtmlInserted, HtmlMissing { ContentDocument dom = TestEditors.createTestDocument(); c = dom.debugGetRawDocument(); ContentElement root = c.getDocumentElement(); m = dom.getContext().rendering().getNodeManager(); // TODO(danilatos): Expand this and other test cases String s1 = "some text", s2 = "other writings", s3 = "more information"; ContentTextNode t1 = c.createTextNode(s1, root, null); Text n1 = t1.getImplNodelet(), n1b; n1b = n1.splitText(1); n1b.setData(s1); n1.removeFromParent(); try { m.findTextWrapper(n1b, false); fail("Expected exception when not repairing"); } catch (HtmlInserted e) { } catch (HtmlMissing e) { } checkWrapper(t1, n1b, true); }
public void testRepairsWherePossible() throws HtmlInserted, HtmlMissing { ContentDocument dom = TestEditors.createTestDocument(); c = dom.debugGetRawDocument(); ContentElement root = c.getDocumentElement(); m = dom.getContext().rendering().getNodeManager(); // TODO(danilatos): Expand this and other test cases String s1 = "some text", s2 = "other writings", s3 = "more information"; ContentTextNode t1 = c.createTextNode(s1, root, null); Text n1 = t1.getImplNodelet(), n1b; n1b = n1.splitText(1); n1b.setData(s1); n1.removeFromParent(); try { m.findTextWrapper(n1b, false); fail("Expected exception when not repairing"); } catch (HtmlInserted e) { } catch (HtmlMissing e) { } checkWrapper(t1, n1b, true); }
Text txt2 = t2.getImplNodelet(); txt1.removeFromParent(); txt2.removeFromParent();
Text txt2 = t2.getImplNodelet(); txt1.removeFromParent(); txt2.removeFromParent();