" <g:MenuBar wbp:name='bar'/>",
" </g:FlowPanel>",
"</ui:UiBinder>");
MenuBarInfo bar = getObjectByName("bar");
IMenuInfo barObject = MenuObjectInfoUtils.getMenuInfo(bar);
IMenuPolicy barPolicy = barObject.getPolicy();
// don't accept something other than MenuItem or MenuItemSeparator
assertFalse(barPolicy.validateCreate(new Object()));
// create new MenuItemSeparator
MenuItemSeparatorInfo newSeparator =
createObject("com.google.gwt.user.client.ui.MenuItemSeparator");
assertTrue(barPolicy.validateCreate(newSeparator));
barPolicy.commandCreate(newSeparator, null);
assertXML(
"// filler filler filler filler filler",
"// filler filler filler filler filler",
"<ui:UiBinder>",
" <g:FlowPanel>",