Example #1
0
  // javadoc inherited.
  public void testClosePane() throws Exception {
    context = new TestMarinerPageContext();
    protocol.setMarinerPageContext(context);
    TestDeviceLayoutContext deviceContext = new TestDeviceLayoutContext();
    context.pushDeviceLayoutContext(deviceContext);

    DOMOutputBuffer dom = new DOMOutputBuffer();
    dom.initialise();
    PaneAttributes attributes = new PaneAttributes();
    Pane pane = new Pane(null);
    attributes.setPane(pane);

    final Element expected;
    // @todo 2005060816 annotate child with style information if it's not inherited from the parent
    dom.openStyledElement("body", attributes);
    dom.openElement("table");
    dom.openElement("tr");
    expected = dom.openElement("td");

    dom.appendEncoded("Example");

    protocol.closePane(dom, attributes);

    assertSame("The DOM's current element isn't as expected", dom.getCurrentElement(), expected);
  }
Example #2
0
 /** Test the method supportsStyleSheets() */
 public void testSupportsStyleSheets() throws Exception {
   assertTrue("This protocol should not support stylesheets.", !protocol.supportsStyleSheets());
 }