parser.setNodeFactory (
new PrototypicalNodeFactory (
new Tag[]
{
new FrameSetTag (),
new FrameTag (),
}));
parseAndAssertNodeCount(1);
assertTrue("Node 0 should be End Tag",node[0] instanceof FrameSetTag);
FrameSetTag frameSetTag = (FrameSetTag)node[0];
// Find the details of the frameset itself
assertEquals("Rows","115,*",frameSetTag.getAttribute("rows"));
assertEquals("FrameBorder","NO",frameSetTag.getAttribute("FrameBorder"));
assertEquals("FrameSpacing","0",frameSetTag.getAttribute("FrameSpacing"));
assertEquals("Border","0",frameSetTag.getAttribute("Border"));
// Now check the frames
FrameTag topFrame = frameSetTag.getFrame("topFrame");
FrameTag mainFrame = frameSetTag.getFrame("mainFrame");
assertNotNull("Top Frame should not be null",topFrame);
assertNotNull("Main Frame should not be null",mainFrame);
assertEquals("Top Frame Name","topFrame",topFrame.getFrameName());
assertEquals("Top Frame Location","http://www.google.com/test/demo_bc_top.html",topFrame.getFrameLocation());
assertEquals("Main Frame Name","mainFrame",mainFrame.getFrameName());
assertEquals("Main Frame Location","http://www.kizna.com/web_e/",mainFrame.getFrameLocation());
assertEquals("Scrolling in Main Frame","AUTO",mainFrame.getAttribute("Scrolling"));
}