Author: rj...@google.com
Date: Thu Jul  9 05:48:51 2009
New Revision: 5695

Modified:
    trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java
    trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java

Log:
Rolling back c5694, due to test failure:

junit.framework.AssertionFailedError: expected=table actual=tbody
   at  
com.google.gwt.user.client.ui.HTMLPanelTest.testCustomRootTag(HTMLPanelTest.java:137)
   at  
com.google.gwt.user.client.ui.__HTMLPanelTest_unitTestImpl.doRunTest(transient  
source for com.google.gwt.user.client.ui.__HTMLPanelTest_unitTestImpl:28)



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 Thu Jul  9  
05:48:51 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    Thu  
Jul  9 05:48:51 2009
@@ -120,25 +120,6 @@
    }

    /**
-   * 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());
-
-    parent = parent.getParentElement();
-    assertEquals("table", parent.getTagName().toLowerCase());
-    assertEquals(hp.getElement(), parent);
-  }
-
-  /**
     * Ensure that {...@link HTMLPanel#getElementById(String)} behaves properly 
 
in
     * both attached and unattached states.
     */

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to