From: <rb...@us...> - 2013-12-22 12:33:25
|
Revision: 8895 http://sourceforge.net/p/htmlunit/code/8895 Author: rbri Date: 2013-12-22 12:33:19 +0000 (Sun, 22 Dec 2013) Log Message: ----------- more javascript object fixes Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLElementsTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java Added Paths: ----------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeygen.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLKeygenElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -76,7 +76,9 @@ HtmlHorizontalRule.TAG_NAME, HtmlHtml.TAG_NAME, HtmlInlineFrame.TAG_NAME, HtmlInlineQuotation.TAG_NAME, HtmlImage.TAG_NAME, HtmlImage.TAG_NAME2, HtmlInsertedText.TAG_NAME, HtmlIsIndex.TAG_NAME, - HtmlItalic.TAG_NAME, HtmlKeyboard.TAG_NAME, HtmlLabel.TAG_NAME, + HtmlItalic.TAG_NAME, + HtmlKeyboard.TAG_NAME, HtmlKeygen.TAG_NAME, + HtmlLabel.TAG_NAME, HtmlLegend.TAG_NAME, HtmlListing.TAG_NAME, HtmlListItem.TAG_NAME, HtmlLink.TAG_NAME, HtmlMap.TAG_NAME, HtmlMark.TAG_NAME, HtmlMarquee.TAG_NAME, HtmlMenu.TAG_NAME, HtmlMeta.TAG_NAME, HtmlMeter.TAG_NAME, HtmlMultiColumn.TAG_NAME, @@ -96,7 +98,7 @@ HtmlTable.TAG_NAME, HtmlTableColumn.TAG_NAME, HtmlTableColumnGroup.TAG_NAME, HtmlTableBody.TAG_NAME, HtmlTableDataCell.TAG_NAME, HtmlTableHeaderCell.TAG_NAME, HtmlTableRow.TAG_NAME, HtmlTextArea.TAG_NAME, HtmlTableFooter.TAG_NAME, - HtmlTableHeader.TAG_NAME, HtmlTeletype.TAG_NAME, HtmlTitle.TAG_NAME, + HtmlTableHeader.TAG_NAME, HtmlTeletype.TAG_NAME, HtmlTime.TAG_NAME, HtmlTitle.TAG_NAME, HtmlUnderlined.TAG_NAME, HtmlUnorderedList.TAG_NAME, HtmlVariable.TAG_NAME, HtmlVideo.TAG_NAME, HtmlWordBreak.TAG_NAME, HtmlExample.TAG_NAME @@ -281,6 +283,9 @@ else if (tagName.equals(HtmlDeletedText.TAG_NAME)) { element = new HtmlDeletedText(namespaceURI, qualifiedName, page, attributeMap); } + else if (tagName.equals(HtmlDirectory.TAG_NAME)) { + element = new HtmlDirectory(namespaceURI, qualifiedName, page, attributeMap); + } else if (tagName.equals(HtmlDivision.TAG_NAME)) { element = new HtmlDivision(namespaceURI, qualifiedName, page, attributeMap); } @@ -397,6 +402,14 @@ else if (tagName.equals(HtmlKeyboard.TAG_NAME)) { element = new HtmlKeyboard(namespaceURI, qualifiedName, page, attributeMap); } + else if (tagName.equals(HtmlKeygen.TAG_NAME)) { + if (page.getWebClient().getBrowserVersion().hasFeature(HTML5_TAGS)) { + element = new HtmlKeygen(namespaceURI, qualifiedName, page, attributeMap); + } + else { + return UnknownElementFactory.instance.createElementNS(page, namespaceURI, qualifiedName, attributes); + } + } else if (tagName.equals(HtmlLabel.TAG_NAME)) { element = new HtmlLabel(namespaceURI, qualifiedName, page, attributeMap); } @@ -607,12 +620,17 @@ else if (tagName.equals(HtmlTextArea.TAG_NAME)) { element = new HtmlTextArea(namespaceURI, qualifiedName, page, attributeMap); } - else if (tagName.equals(HtmlDirectory.TAG_NAME)) { - element = new HtmlDirectory(namespaceURI, qualifiedName, page, attributeMap); - } else if (tagName.equals(HtmlTitle.TAG_NAME)) { element = new HtmlTitle(namespaceURI, qualifiedName, page, attributeMap); } + else if (tagName.equals(HtmlTime.TAG_NAME)) { + if (page.getWebClient().getBrowserVersion().hasFeature(HTML5_TAGS)) { + element = new HtmlTime(namespaceURI, qualifiedName, page, attributeMap); + } + else { + return UnknownElementFactory.instance.createElementNS(page, namespaceURI, qualifiedName, attributes); + } + } else if (tagName.equals(HtmlUnderlined.TAG_NAME)) { element = new HtmlUnderlined(namespaceURI, qualifiedName, page, attributeMap); } Added: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeygen.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeygen.java (rev 0) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeygen.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2013 Gargoyle Software 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 License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.html; + +import java.util.Map; + +import com.gargoylesoftware.htmlunit.SgmlPage; + +/** + * Wrapper for the HTML element "keygen". + * + * @version $Revision: 8882 $ + * @author Ronald Brill + */ +public class HtmlKeygen extends HtmlElement { + + /** The HTML tag represented by this element. */ + public static final String TAG_NAME = "keygen"; + + /** + * Creates a new instance. + * + * @param namespaceURI the URI that identifies an XML namespace + * @param qualifiedName the qualified name of the element type to instantiate + * @param page the page that contains this element + * @param attributes the initial attributes + */ + HtmlKeygen(final String namespaceURI, final String qualifiedName, final SgmlPage page, + final Map<String, DomAttr> attributes) { + super(namespaceURI, qualifiedName, page, attributes); + } + + /** + * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/> + * + * Returns the default display style. + * + * @return the default display style. + */ + @Override + public DisplayStyle getDefaultStyleDisplay() { + return DisplayStyle.INLINE; + } +} Added: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java (rev 0) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2013 Gargoyle Software 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 License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.html; + +import java.util.Map; + +import com.gargoylesoftware.htmlunit.SgmlPage; + +/** + * Wrapper for the HTML element "time". + * + * @version $Revision: 8871 $ + * @author Ronald Brill + */ +public class HtmlTime extends HtmlElement { + + /** The HTML tag represented by this element. */ + public static final String TAG_NAME = "time"; + + /** + * Creates a new instance. + * + * @param namespaceURI the URI that identifies an XML namespace + * @param qualifiedName the qualified name of the element type to instantiate + * @param page the page that contains this element + * @param attributes the initial attributes + */ + HtmlTime(final String namespaceURI, final String qualifiedName, final SgmlPage page, + final Map<String, DomAttr> attributes) { + super(namespaceURI, qualifiedName, page, attributes); + } + + /** + * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/> + * + * Returns the default display style. + * + * @return the default display style. + */ + @Override + public DisplayStyle getDefaultStyleDisplay() { + return DisplayStyle.INLINE; + } +} Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -151,6 +151,7 @@ import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLInlineQuotationElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLInputElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLIsIndexElement; +import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLKeygenElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLLIElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLLabelElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLLegendElement; @@ -190,6 +191,7 @@ import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTableSectionElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTextAreaElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTextElement; +import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTimeElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTitleElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLUListElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLUnknownElement; @@ -294,7 +296,8 @@ FormChild.class, FormField.class, Geolocation.class, HashChangeEvent.class, History.class, HTMLAnchorElement.class, HTMLAppletElement.class, HTMLAreaElement.class, HTMLAudioElement.class, - HTMLBRElement.class, HTMLBaseElement.class, HTMLBaseFontElement.class, HTMLBGSoundElement.class, + HTMLBGSoundElement.class, + HTMLBRElement.class, HTMLBaseElement.class, HTMLBaseFontElement.class, HTMLBlockElement.class, HTMLBlockQuoteElement.class, HTMLBodyElement.class, HTMLButtonElement.class, HTMLCanvasElement.class, HTMLCollection.class, HTMLCollectionTags.class, @@ -306,7 +309,9 @@ HTMLFontElement.class, HTMLFormElement.class, HTMLFrameElement.class, HTMLFrameSetElement.class, HTMLHRElement.class, HTMLHeadElement.class, HTMLHeadingElement.class, HTMLHtmlElement.class, HTMLIFrameElement.class, HTMLImageElement.class, HTMLInlineQuotationElement.class, HTMLInputElement.class, - HTMLIsIndexElement.class, HTMLLIElement.class, HTMLLabelElement.class, + HTMLIsIndexElement.class, + HTMLKeygenElement.class, + HTMLLIElement.class, HTMLLabelElement.class, HTMLLegendElement.class, HTMLLinkElement.class, HTMLListElement.class, HTMLMapElement.class, HTMLMarqueeElement.class, HTMLMediaElement.class, HTMLMenuElement.class, HTMLMetaElement.class, HTMLMeterElement.class, @@ -321,7 +326,7 @@ HTMLSelectElement.class, HTMLSourceElement.class, HTMLSpanElement.class, HTMLStyleElement.class, HTMLTableCaptionElement.class, HTMLTableCellElement.class, HTMLTableColElement.class, HTMLTableComponent.class, HTMLTableElement.class, HTMLTableRowElement.class, HTMLTableSectionElement.class, - HTMLTextElement.class, HTMLTextAreaElement.class, HTMLTitleElement.class, + HTMLTextElement.class, HTMLTextAreaElement.class, HTMLTimeElement.class, HTMLTitleElement.class, HTMLUListElement.class, HTMLUnknownElement.class, HTMLWBRElement.class, HTMLVideoElement.class, Added: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLKeygenElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLKeygenElement.java (rev 0) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLKeygenElement.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2013 Gargoyle Software 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 License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.javascript.host.html; + +import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.IE; +import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF; + +import com.gargoylesoftware.htmlunit.html.HtmlKeygen; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; +import com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser; + +/** + * The JavaScript object "HTMLSpanElement". + * + * @version $Revision: 8882 $ + * @author Ahmed Ashour + * @author Daniel Gredler + * @author Ronald Brill + */ +@JsxClass(domClass = HtmlKeygen.class, browsers = { @WebBrowser(FF), @WebBrowser(value = IE, minVersion = 11) }) +public class HTMLKeygenElement extends HTMLElement { + + /** + * {@inheritDoc} + */ + @Override + public String getClassName() { + return "HTMLSpanElement"; + } + + /** + * Returns whether the end tag is forbidden or not. + * @see <a href="http://www.w3.org/TR/html4/index/elements.html">HTML 4 specs</a> + * @return whether the end tag is forbidden or not + */ + protected boolean isEndTagForbidden() { + return true; + } +} Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -17,6 +17,7 @@ import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLABBREVIATED; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_PHRASE_COMMON_CLASS_NAME; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_XML_SUPPORT_VIA_ACTIVEXOBJECT; +import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF; import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.IE; import com.gargoylesoftware.htmlunit.html.DomNode; @@ -67,7 +68,7 @@ @JsxClass(domClass = HtmlAcronym.class), @JsxClass(domClass = HtmlBidirectionalOverride.class), @JsxClass(domClass = HtmlBig.class), - @JsxClass(domClass = HtmlBlink.class), + @JsxClass(domClass = HtmlBlink.class, browsers = { @WebBrowser(IE), @WebBrowser(value = FF, maxVersion = 17) }), @JsxClass(domClass = HtmlBold.class), @JsxClass(domClass = HtmlCitation.class), @JsxClass(domClass = HtmlCode.class), Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -35,7 +35,8 @@ * @author Ronald Brill */ @JsxClasses({ - @JsxClass(domClass = HtmlMultiColumn.class, browsers = { @WebBrowser(FF), @WebBrowser(CHROME) }), + @JsxClass(domClass = HtmlMultiColumn.class, + browsers = { @WebBrowser(value = FF, maxVersion = 17), @WebBrowser(CHROME) }), @JsxClass(domClass = HtmlSpan.class) }) public class HTMLSpanElement extends HTMLElement { Added: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java (rev 0) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2013 Gargoyle Software 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 License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.javascript.host.html; + +import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF; + +import com.gargoylesoftware.htmlunit.html.DomNode; +import com.gargoylesoftware.htmlunit.html.DomText; +import com.gargoylesoftware.htmlunit.html.HtmlTime; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; +import com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser; + +/** + * The JavaScript object "HTMLTimeElement". + * + * @version $Revision: 8672 $ + * @author Ronald Brill + */ +@JsxClass(domClass = HtmlTime.class, browsers = @WebBrowser(value = FF, minVersion = 24)) +public class HTMLTimeElement extends HTMLElement { + + /** + * Returns the <tt>text</tt> attribute. + * @return the <tt>text</tt> attribute + */ + @Override + @JsxGetter + public String getText() { + final DomNode firstChild = getDomNodeOrDie().getFirstChild(); + if (firstChild != null) { + return firstChild.getNodeValue(); + } + return ""; + } + + /** + * Sets the <tt>text</tt> attribute. + * @param text the <tt>text</tt> attribute + */ + @JsxSetter + public void setText(final String text) { + final DomNode htmlElement = getDomNodeOrDie(); + DomNode firstChild = htmlElement.getFirstChild(); + if (firstChild == null) { + firstChild = new DomText(htmlElement.getPage(), text); + htmlElement.appendChild(firstChild); + } + else { + firstChild.setNodeValue(text); + } + } +} Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -100,7 +100,9 @@ "HtmlImage", "HtmlImage", "HtmlInsertedText", "HtmlIsIndex", "HtmlItalic", "HtmlKeyboard", "HtmlLabel", "HtmlLegend", "HtmlListing", "HtmlListItem", - "HtmlLink", "HtmlMap", "HtmlMark", "HtmlMarquee", + "HtmlLink", + "HtmlKeygen", + "HtmlMap", "HtmlMark", "HtmlMarquee", "HtmlMenu", "HtmlMeta", "HtmlMeter", "HtmlMultiColumn", "HtmlNav", "HtmlNextId", "HtmlNoBreak", "HtmlNoEmbed", "HtmlNoFrames", @@ -118,7 +120,8 @@ "HtmlTable", "HtmlTableColumn", "HtmlTableColumnGroup", "HtmlTableBody", "HtmlTableDataCell", "HtmlTableHeaderCell", "HtmlTableRow", "HtmlTextArea", "HtmlTableFooter", - "HtmlTableHeader", "HtmlTeletype", "HtmlTitle", + "HtmlTableHeader", "HtmlTeletype", + "HtmlTime", "HtmlTitle", "HtmlUnderlined", "HtmlUnorderedList", "HtmlVariable", "HtmlVideo", "HtmlWordBreak", "HtmlExample" Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLElementsTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLElementsTest.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLElementsTest.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -652,6 +652,17 @@ * @throws Exception if the test fails */ @Test + @Alerts(DEFAULT = "1", + IE8 = "0") + @NotYetImplemented(IE8) + public void elementClosesItself_keygen() throws Exception { + loadPageWithAlerts2(elementClosesItself("keygen")); + } + + /** + * @throws Exception if the test fails + */ + @Test @Alerts("1") public void elementClosesItself_label() throws Exception { loadPageWithAlerts2(elementClosesItself("label")); @@ -1218,6 +1229,17 @@ @Test @Alerts(DEFAULT = "1", IE8 = "0") + @NotYetImplemented(IE8) + public void elementClosesItself_time() throws Exception { + loadPageWithAlerts2(elementClosesItself("time")); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "1", + IE8 = "0") @NotYetImplemented(FF) public void elementClosesItself_title() throws Exception { loadPageWithAlerts2(elementClosesItself("title")); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -935,6 +935,17 @@ * @throws Exception if the test fails */ @Test + @Alerts(DEFAULT = { "3", "2", "2", "3", "2", "3" }, + IE8 = { "2", "2", "2", "4", "4", "3" }) + @NotYetImplemented + public void childNodes_keygen() throws Exception { + loadPageWithAlerts2(createHtmlForChildNodes("keygen")); + } + + /** + * @throws Exception if the test fails + */ + @Test @Alerts(DEFAULT = { "3", "2", "2", "3", "2", "2" }, IE8 = { "1", "1", "1", "2", "2", "1" }) public void childNodes_label() throws Exception { @@ -1538,6 +1549,17 @@ */ @Test @Alerts(DEFAULT = { "3", "2", "2", "3", "2", "2" }, + IE8 = { "2", "2", "2", "4", "4", "3" }) + @NotYetImplemented(IE8) + public void childNodes_time() throws Exception { + loadPageWithAlerts2(createHtmlForChildNodes("time")); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = { "3", "2", "2", "3", "2", "2" }, IE8 = { "0", "0", "0", "0", "0", "0" }) @NotYetImplemented(FF) public void childNodes_title() throws Exception { Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java 2013-12-22 12:27:35 UTC (rev 8894) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java 2013-12-22 12:33:19 UTC (rev 8895) @@ -3669,6 +3669,16 @@ * @throws Exception if the test fails */ @Test + @Alerts(DEFAULT = "<keygen>", + IE8 = "<keygen></keygen>") + public void outerHTML_keygen() throws Exception { + loadPageWithAlerts2(outerHTML("keygen")); + } + + /** + * @throws Exception if the test fails + */ + @Test @Alerts(DEFAULT = "<label></label>", IE8 = "<LABEL></LABEL>") public void outerHTML_label() throws Exception { @@ -4176,6 +4186,15 @@ * @throws Exception if the test fails */ @Test + @Alerts("<time></time>") + public void outerHTML_time() throws Exception { + loadPageWithAlerts2(outerHTML("time")); + } + + /** + * @throws Exception if the test fails + */ + @Test @Alerts(DEFAULT = "<title></title>", IE8 = "<TITLE></TITLE>") public void outerHTML_title() throws Exception { |