From: <asa...@us...> - 2013-01-09 06:06:23
|
Revision: 7973 http://sourceforge.net/p/htmlunit/code/7973 Author: asashour Date: 2013-01-09 06:06:18 +0000 (Wed, 09 Jan 2013) Log Message: ----------- Some more elements to close "p": address, center, dd, dir, dl, dt, fieldset, listing, li, menu, ol, pre, ul and xmp. Modified Paths: -------------- trunk/htmlunit/src/changes/changes.xml trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/YuiTest.java Modified: trunk/htmlunit/src/changes/changes.xml =================================================================== --- trunk/htmlunit/src/changes/changes.xml 2013-01-08 17:22:19 UTC (rev 7972) +++ trunk/htmlunit/src/changes/changes.xml 2013-01-09 06:06:18 UTC (rev 7973) @@ -8,6 +8,10 @@ <body> <release version="2.12" date="???" description="Bugfixes, CSS3 Selectors"> + <action type="fix" dev="asashour"> + Some more elements close "p": address, center, dd, dir, dl, dt, fieldset, listing, li, menu, + ol, pre, ul and xmp. + </action> <action type="update" dev="mguillem"> Set max number of simultaneous connections per server to 6. </action> Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java 2013-01-08 17:22:19 UTC (rev 7972) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java 2013-01-09 06:06:18 UTC (rev 7973) @@ -322,7 +322,7 @@ public void testGetByXPath() throws Exception { final String htmlContent = "<html><head><title>my title</title></head><body>\n" - + "<p id='p1'><ul><li>foo 1</li><li>foo 2</li></li></p>\n" + + "<div id='d1'><ul><li>foo 1</li><li>foo 2</li></li></div>\n" + "<div><span>bla</span></div>\n" + "</body></html>"; final HtmlPage page = loadPage(htmlContent); @@ -338,13 +338,13 @@ assertEquals(0, head.getByXPath("/title").size()); assertEquals(results, head.getByXPath("title")); - final HtmlParagraph p = page.getFirstByXPath("//p"); - assertSame(p, page.getHtmlElementById("p1")); - final List<?> lis = p.getByXPath("ul/li"); + final HtmlElement div = page.getFirstByXPath("//div"); + assertSame(div, page.getHtmlElementById("d1")); + final List<?> lis = div.getByXPath("ul/li"); assertEquals(2, lis.size()); assertEquals(lis, page.getByXPath("//ul/li")); - assertEquals(2, p.<Number>getFirstByXPath("count(//li)").intValue()); + assertEquals(2, div.<Number>getFirstByXPath("count(//li)").intValue()); } /** @@ -405,7 +405,7 @@ public void testGetFirstByXPath() throws Exception { final String htmlContent = "<html><head><title>my title</title></head><body>\n" - + "<p id='p1'><ul><li>foo 1</li><li>foo 2</li></li></p>\n" + + "<div id='d1'><ul><li>foo 1</li><li>foo 2</li></li></div>\n" + "<div><span>bla</span></div>\n" + "</body></html>"; final HtmlPage page = loadPage(htmlContent); @@ -419,12 +419,12 @@ assertNull(head.getFirstByXPath("/title")); assertSame(title, head.getFirstByXPath("title")); - final HtmlParagraph p = (HtmlParagraph) page.getFirstByXPath("//p"); - assertSame(p, page.getHtmlElementById("p1")); - final HtmlListItem listItem = (HtmlListItem) p.getFirstByXPath("ul/li"); + final HtmlElement div = page.getFirstByXPath("//div"); + assertSame(div, page.getHtmlElementById("d1")); + final HtmlListItem listItem = (HtmlListItem) div.getFirstByXPath("ul/li"); assertSame(listItem, page.getFirstByXPath("//ul/li")); - assertEquals(2, ((Number) p.getFirstByXPath("count(//li)")).intValue()); + assertEquals(2, ((Number) div.getFirstByXPath("count(//li)")).intValue()); } /** Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java 2013-01-08 17:22:19 UTC (rev 7972) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java 2013-01-09 06:06:18 UTC (rev 7973) @@ -340,7 +340,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_address() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("address")); } @@ -504,7 +503,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_center() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("center")); } @@ -541,7 +539,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_dd() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("dd")); } @@ -560,7 +557,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_dir() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("dir")); } @@ -579,7 +575,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_dl() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("dl")); } @@ -589,7 +584,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_dt() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("dt")); } @@ -618,7 +612,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_fieldset() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("fieldset")); } @@ -832,7 +825,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_listing() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("listing")); } @@ -842,7 +834,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_li() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("li")); } @@ -880,7 +871,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_menu() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("menu")); } @@ -955,7 +945,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_ol() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("ol")); } @@ -1014,7 +1003,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_pre() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("pre")); } @@ -1283,7 +1271,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_ul() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("ul")); } @@ -1322,7 +1309,6 @@ */ @Test @Alerts(IE = { "0", "0", "0", "0", "0", "0" }, FF = { "1", "0", "1", "1", "0", "1" }) - @NotYetImplemented public void childNodes_xmp() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("xmp")); } Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/YuiTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/YuiTest.java 2013-01-08 17:22:19 UTC (rev 7972) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/YuiTest.java 2013-01-09 06:06:18 UTC (rev 7973) @@ -227,8 +227,6 @@ doTest(fileName, knownFailingTests, null, 0); } - /** - */ private void doTest(final String fileName, final List<String> knownFailingTests, final String buttonToPush, final long timeToWait) throws Exception { |