Author: rj...@google.com Date: Fri Jul 10 08:13:58 2009 New Revision: 5713
Removed: trunk/user/src/com/google/gwt/junit/FakeMessagesMaker.java trunk/user/test/com/google/gwt/junit/FakeMessagesMakerTest.java trunk/user/test/com/google/gwt/junit/JUnitSuite.java Modified: trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java Log: Revert c5711 due to check style failures. Modified: trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java ============================================================================== --- trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java (original) +++ trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java Fri Jul 10 08:13:58 2009 @@ -40,29 +40,16 @@ } /** - * Creates an HTML panel with the specified HTML contents inside a DIV - * element. Any element within this HTML that has a specified id can contain a - * child widget. + * Creates an HTML panel with the specified HTML contents. Any element within + * this HTML that has a specified id can contain a child widget. * * @param html the panel's HTML */ public HTMLPanel(String html) { - this("div", html); - } - - /** - * Creates an HTML panel whose root element has the given tag, and with the - * specified HTML contents. Any element within this HTML that has a specified - * id can contain a child widget. - * - * @param tag the tag of the root element - * @param html the panel's HTML - */ - public HTMLPanel(String tag, String html) { - setElement(DOM.createElement(tag)); + setElement(DOM.createDiv()); DOM.setInnerHTML(getElement(), html); } - + /** * Adds a child widget to the panel, contained within the HTML element * specified by a given id. Modified: trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java ============================================================================== --- trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java (original) +++ trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java Fri Jul 10 08:13:58 2009 @@ -1,12 +1,12 @@ /* * Copyright 2008 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -117,28 +117,6 @@ Node next = button.getElement().getNextSibling(); assertEquals("bar", next.getNodeValue()); - } - - /** - * Tests arbitrary root tag - */ - public void testCustomRootTag() { - HTMLPanel hp = new HTMLPanel("table", "<tr><td>Hello <span id='labelHere'></span></td></tr>"); - InlineLabel label = new InlineLabel("World"); - hp.addAndReplaceElement(label, "labelHere"); - - Element parent = label.getElement().getParentElement(); - assertEquals("td", parent.getTagName().toLowerCase()); - - parent = parent.getParentElement(); - assertEquals("tr", parent.getTagName().toLowerCase()); - - while (parent != null && parent != hp.getElement()) { - parent = parent.getParentElement(); - } - - assertNotNull(parent); - assertEquals("table", parent.getTagName().toLowerCase()); } /** --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---