From: <rb...@us...> - 2016-05-12 17:55:43
|
Revision: 12597 http://sourceforge.net/p/htmlunit/code/12597 Author: rbri Date: 2016-05-12 17:55:41 +0000 (Thu, 12 May 2016) Log Message: ----------- latest Chrome Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormDataTest.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java 2016-05-12 15:47:31 UTC (rev 12596) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java 2016-05-12 17:55:41 UTC (rev 12597) @@ -14,6 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.xml; +import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF; import java.util.ArrayList; @@ -92,7 +93,7 @@ * Removes the entry (if exists). * @param name the name of the field to remove */ - @JsxFunction(functionName = "delete", value = @WebBrowser(value = FF, minVersion = 45)) + @JsxFunction(functionName = "delete", value = {@WebBrowser(value = FF, minVersion = 45), @WebBrowser(CHROME)}) public void delete_js(final String name) { if (StringUtils.isEmpty(name)) { return; @@ -111,7 +112,7 @@ * @param name the name of the field to check * @return the first value found for the give name */ - @JsxFunction(@WebBrowser(value = FF, minVersion = 45)) + @JsxFunction({@WebBrowser(value = FF, minVersion = 45), @WebBrowser(CHROME)}) public String get(final String name) { if (StringUtils.isEmpty(name)) { return null; @@ -131,7 +132,7 @@ * @param name the name of the field to check * @return the first value found for the give name */ - @JsxFunction(@WebBrowser(value = FF, minVersion = 45)) + @JsxFunction({@WebBrowser(value = FF, minVersion = 45), @WebBrowser(CHROME)}) public Scriptable getAll(final String name) { if (StringUtils.isEmpty(name)) { return Context.getCurrentContext().newArray(this, 0); @@ -154,7 +155,7 @@ * @param name the name of the field to check * @return true if the name exists */ - @JsxFunction(@WebBrowser(value = FF, minVersion = 45)) + @JsxFunction({@WebBrowser(value = FF, minVersion = 45), @WebBrowser(CHROME)}) public boolean has(final String name) { if (StringUtils.isEmpty(name)) { return false; @@ -177,7 +178,7 @@ * @param value the field's value * @param filename the filename reported to the server (optional) */ - @JsxFunction(@WebBrowser(value = FF, minVersion = 45)) + @JsxFunction({@WebBrowser(value = FF, minVersion = 45), @WebBrowser(CHROME)}) public void set(final String name, final Object value, final Object filename) { if (StringUtils.isEmpty(name)) { return; Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormDataTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormDataTest.java 2016-05-12 15:47:31 UTC (rev 12596) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormDataTest.java 2016-05-12 17:55:41 UTC (rev 12597) @@ -55,8 +55,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"function", "undefined", "undefined", "undefined", "undefined", "undefined"}, - FF45 = {"function", "function", "function", "function", "function", "function"}) + @Alerts(DEFAULT = {"function", "function", "function", "function", "function", "function"}, + FF38 = {"function", "undefined", "undefined", "undefined", "undefined", "undefined"}, + IE = {"function", "undefined", "undefined", "undefined", "undefined", "undefined"}) public void functions() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -397,8 +398,9 @@ * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "no delete", - FF45 = {"myKey", "myKey1"}) + @Alerts(DEFAULT = {"myKey", "myKey1"}, + FF38 = "no delete", + IE = "no delete") public void delete() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -451,8 +453,9 @@ * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "no get", - FF45 = {"myValue", "null", "null", "null", "null"}) + @Alerts(DEFAULT = {"myValue", "null", "null", "null", "null"}, + FF38 = "no get", + IE = "no get") public void get() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -494,8 +497,9 @@ * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "no getAll", - FF45 = {"myValue,myValue2", "", "", "", ""}) + @Alerts(DEFAULT = {"myValue,myValue2", "", "", "", ""}, + FF38 = "no getAll", + IE = "no getAll") public void getAll() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -537,8 +541,9 @@ * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "no has", - FF45 = {"true", "false", "false"}) + @Alerts(DEFAULT = {"true", "false", "false"}, + FF38 = "no has", + IE = "no has") public void has() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ |