@@ -1748,52 +1748,6 @@ public void title_EmptyXmlTagExpanded() throws Exception {
17481748 assertTrue (page .asXml ().indexOf ("</title>" ) != -1 );
17491749 }
17501750
1751- /**
1752- * Tests getElementById() of child element after appendChild(), removeChild(), then appendChild()
1753- * of the parent element.
1754- *
1755- * @throws Exception if the test fails
1756- */
1757- @ Test
1758- public void getElementById_AfterAppendRemoveAppendChild () throws Exception {
1759- final String content = "<html><head><title>foo</title><script>\n "
1760- + " function test() {\n "
1761- + " var table = document.createElement('table');\n "
1762- + " var tr = document.createElement('tr');\n "
1763- + " tr.id = 'myTR';\n "
1764- + " table.appendChild(tr);\n "
1765- + " document.body.appendChild(table);\n "
1766- + " document.body.removeChild(table);\n "
1767- + " document.body.appendChild(table);\n "
1768- + " alert(document.getElementById('myTR'));\n "
1769- + " }\n "
1770- + "</script></head><body onload='test()'>\n "
1771- + "</body></html>" ;
1772- final List <String > collectedAlerts = new ArrayList <>();
1773- loadPage (content , collectedAlerts );
1774- assertFalse ("null" .equals (collectedAlerts .get (0 )));
1775- }
1776-
1777- /**
1778- * @throws Exception if the test fails
1779- */
1780- @ Test
1781- public void getElementById_AfterAppendingToNewlyCreatedElement () throws Exception {
1782- final String content = "<html><head><title>foo</title><script>\n "
1783- + " function test() {\n "
1784- + " var table = document.createElement('table');\n "
1785- + " var tr = document.createElement('tr');\n "
1786- + " tr.id = 'myTR';\n "
1787- + " table.appendChild(tr);\n "
1788- + " alert(document.getElementById('myTR'));\n "
1789- + " }\n "
1790- + "</script></head><body onload='test()'>\n "
1791- + "</body></html>" ;
1792- final List <String > collectedAlerts = new ArrayList <>();
1793- loadPage (content , collectedAlerts );
1794- assertTrue ("null" .equals (collectedAlerts .get (0 )));
1795- }
1796-
17971751 /**
17981752 * @throws Exception if the test fails
17991753 */
@@ -1905,7 +1859,7 @@ public void asNormalizedText() throws Exception {
19051859 + "</table></body></html>" ;
19061860
19071861 final HtmlPage page = loadPage (htmlContent );
1908- page .asNormalizedText ();
1862+ assertEquals ( "test \n a" , page .asNormalizedText () );
19091863 }
19101864
19111865 /**
0 commit comments