From: <rb...@us...> - 2018-06-18 19:05:26
|
Revision: 15355 http://sourceforge.net/p/htmlunit/code/15355 Author: rbri Date: 2018-06-18 19:05:16 +0000 (Mon, 18 Jun 2018) Log Message: ----------- more ff60 expectations Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/HostConstantsTest.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -16,6 +16,7 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; +import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; @@ -1645,7 +1646,7 @@ public static final long STENCIL_FUNC = 2962L; /** The constant {@code STENCIL_INDEX}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final long STENCIL_INDEX = 6401L; /** The constant {@code STENCIL_INDEX8}. */ Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -17,7 +17,6 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; -import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF60; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; @@ -340,7 +339,7 @@ @JsxConstant public static final int TEXTURE = 0x1702; /** The constant {@code STENCIL_INDEX}. */ - @JsxConstant({FF52, FF60, IE}) + @JsxConstant({FF52, IE}) public static final int STENCIL_INDEX = 0x1901; /** The constant {@code DEPTH_COMPONENT}. */ @JsxConstant Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -17,6 +17,7 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; +import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF60; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; @@ -45,7 +46,7 @@ /** * The rule is a {@code CSSUnknownRule}. */ - @JsxConstant({FF, IE, EDGE}) + @JsxConstant({FF52, IE, EDGE}) public static final short UNKNOWN_RULE = org.w3c.dom.css.CSSRule.UNKNOWN_RULE; /** @@ -93,7 +94,7 @@ /** * The rule is a {@code CSSKeyframesRule}. */ - @JsxConstant(FF) + @JsxConstant(FF52) public static final short MOZ_KEYFRAMES_RULE = 7; /** @@ -105,7 +106,7 @@ /** * The rule is a {@code CSSKeyframeRule}. */ - @JsxConstant(FF) + @JsxConstant(FF52) public static final short MOZ_KEYFRAME_RULE = 8; /** Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -17,6 +17,7 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; +import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; @@ -33,13 +34,13 @@ public class SVGClipPathElement extends SVGElement { /** Constant for {@code SVG_UNIT_TYPE_UNKNOWN}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_UNKNOWN = 0; /** Constant for {@code SVG_UNIT_TYPE_USERSPACEONUSE}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_USERSPACEONUSE = 1; /** Constant for {@code SVG_UNIT_TYPE_OBJECTBOUNDINGBOX}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; /** Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -17,6 +17,7 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; +import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; @@ -33,13 +34,13 @@ public class SVGFilterElement extends SVGElement { /** Constant for {@code SVG_UNIT_TYPE_UNKNOWN}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_UNKNOWN = 0; /** Constant for {@code SVG_UNIT_TYPE_USERSPACEONUSE}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_USERSPACEONUSE = 1; /** Constant for {@code SVG_UNIT_TYPE_OBJECTBOUNDINGBOX}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; /** Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -17,6 +17,7 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; +import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; @@ -44,13 +45,13 @@ @JsxConstant public static final int SVG_SPREADMETHOD_REPEAT = 3; /** Constant for {@code SVG_UNIT_TYPE_UNKNOWN}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_UNKNOWN = 0; /** Constant for {@code SVG_UNIT_TYPE_USERSPACEONUSE}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_USERSPACEONUSE = 1; /** Constant for {@code SVG_UNIT_TYPE_OBJECTBOUNDINGBOX}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; /** Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -17,6 +17,7 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; +import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; @@ -39,13 +40,13 @@ @JsxConstant(FF) public static final int SVG_MASKTYPE_ALPHA = 1; /** Constant for {@code SVG_UNIT_TYPE_UNKNOWN}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_UNKNOWN = 0; /** Constant for {@code SVG_UNIT_TYPE_USERSPACEONUSE}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_USERSPACEONUSE = 1; /** Constant for {@code SVG_UNIT_TYPE_OBJECTBOUNDINGBOX}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; /** Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -17,6 +17,7 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; +import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF52; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; @@ -33,13 +34,13 @@ public class SVGPatternElement extends SVGElement { /** Constant for {@code SVG_UNIT_TYPE_UNKNOWN}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_UNKNOWN = 0; /** Constant for {@code SVG_UNIT_TYPE_USERSPACEONUSE}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_USERSPACEONUSE = 1; /** Constant for {@code SVG_UNIT_TYPE_OBJECTBOUNDINGBOX}. */ - @JsxConstant({FF, IE}) + @JsxConstant({FF52, IE}) public static final int SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; /** Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/HostConstantsTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/HostConstantsTest.java 2018-06-18 15:53:47 UTC (rev 15354) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/HostConstantsTest.java 2018-06-18 19:05:16 UTC (rev 15355) @@ -26,6 +26,8 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner.Default; @@ -77,8 +79,11 @@ public void test() throws Exception { setExpectedAlerts(getExpectedString()); - loadPageWithAlerts2("<html><head>\n" + final String html = "<html><head>\n" + "<script>\n" + + "function log(x) {\n" + + " document.getElementById('log').value += x + '\\n';\n" + + "}\n" + "function test() {\n" + " try {\n" + " var all = [];\n" @@ -104,12 +109,18 @@ + " var x = all[i];\n" + " string += x + ':' + " + host_ + "[x] + ' ';\n" + " }\n" - + " alert(string);\n" + + " log(string);\n" + " } catch (e) {}\n" + "}\n" + "</script>\n" - + "</head><body onload='test()'>\n" - + "</body></html>"); + + "</head>\n" + + "<body onload='test()'>\n" + + " <textarea id='log' cols='80' rows='40'></textarea>\n" + + "</body></html>"; + + final WebDriver driver = loadPage2(html); + final String text = driver.findElement(By.id("log")).getAttribute("value").trim().replaceAll("\r", ""); + assertEquals(String.join("\n", getExpectedAlerts()), text); } /** @@ -156,7 +167,7 @@ for (final String key : constants) { builder.append(key).append(' '); } - return builder.toString(); + return builder.toString().trim(); } /** |