* todo XDIME-CP: Fix when done layout transformation.
*/
public void notestOpenPane() throws RepositoryException {
privateSetUp();
DOMOutputBuffer buffer = new DOMOutputBuffer();
buffer.initialise();
Element el = null;
Pane pane = null;
PaneAttributes attributes = null;
//=============================================================
// Styles defined = No
//=============================================================
pane = new Pane(null);
attributes = new PaneAttributes();
attributes.setStyles(StylesBuilder.getDeprecatedStyles());
attributes.setPane(pane);
protocol.openPane(buffer, attributes);
assertSame("The buffer current element should be the root element " +
"but was" + buffer.getCurrentElement(),
buffer.getRoot(),
buffer.getCurrentElement());
//=============================================================
// Styles defined = Yes
//@todo XDIME-CP pass in Styles and check they're correctly propagated through
//=============================================================
pane = new Pane(null);
attributes = new PaneAttributes();
attributes.setStyles(StylesBuilder.getDeprecatedStyles());
// attributes.setStyleClass("fred");
// attributes.setBackgroundColour("#ff0000");
// attributes.setBorderWidth("1");
// attributes.setCellPadding("2");
// attributes.setCellSpacing("3");
attributes.setPane(pane);
protocol.openPane(buffer, attributes);
try {
// A div will have been opened to render styles because:
// 1. This protocol supports stylesheets.
// 2. The pane has a style class "fred".
// 3. Any of border width/cell padding/cell spacing have non-zero
// values.
// The div will have an appropriate class attribute.
el = buffer.closeElement("div");
// assertEquals("Invalid class attribute on div",
// "VE-pane-fred", el.getAttributeValue("class"));
el = buffer.closeElement("td");
assertNull("bgcolor on td", el.getAttributeValue("bgcolor"));
assertNull("border on td", el.getAttributeValue("border"));
assertNull("cellspacing on td", el.getAttributeValue("cellspacing"));
assertNull("cellpadding on td", el.getAttributeValue("cellpadding"));
el = buffer.closeElement("tr");
assertNull("Class attribute on tr", el.getAttributeValue("class"));
assertNull("bgcolor on tr", el.getAttributeValue("bgcolor"));
assertNull("border on tr", el.getAttributeValue("border"));
assertNull("cellspacing on tr", el.getAttributeValue("cellspacing"));
assertNull("cellpadding on tr", el.getAttributeValue("cellpadding"));
el = buffer.closeElement("table");
// assertNull("Invalid class attribute on table",
// el.getAttributeValue("class"));
assertEquals("Invalid bgcolor attribute",
"#ff0000", el.getAttributeValue("bgcolor"));
assertEquals("Invalid border attribute",