From: <rb...@us...> - 2017-05-06 07:30:23
|
Revision: 14383 http://sourceforge.net/p/htmlunit/code/14383 Author: rbri Date: 2017-05-06 07:30:20 +0000 (Sat, 06 May 2017) Log Message: ----------- FF52/Chrome Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-05 20:33:28 UTC (rev 14382) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-05-06 07:30:20 UTC (rev 14383) @@ -1332,10 +1332,6 @@ @BrowserFeature(IE) JS_WINDOW_FRAME_BY_ID_RETURNS_WINDOW, - /** <code>window.mozPaintCount</code> returns 0 instead of 8. */ - @BrowserFeature(FF45) - JS_WINDOW_MOZ_PAINT_COUNT_ZERO, - /** * Difference of window.outer/inner height is 63. */ Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-05-05 20:33:28 UTC (rev 14382) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2017-05-06 07:30:20 UTC (rev 14383) @@ -18,7 +18,6 @@ import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_WINDOW_FORMFIELDS_ACCESSIBLE_BY_NAME; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_WINDOW_FRAMES_ACCESSIBLE_BY_ID; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_WINDOW_FRAME_BY_ID_RETURNS_WINDOW; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_WINDOW_MOZ_PAINT_COUNT_ZERO; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_WINDOW_SELECTION_NULL_IF_INVISIBLE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_WINDOW_TOP_WRITABLE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; @@ -1784,10 +1783,7 @@ */ @JsxGetter(FF) public int getMozPaintCount() { - if (getBrowserVersion().hasFeature(JS_WINDOW_MOZ_PAINT_COUNT_ZERO)) { - return 0; - } - return 8; + return 0; } /** Definition of special cases for the smart DomHtmlAttributeChangeListenerImpl */ Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java 2017-05-05 20:33:28 UTC (rev 14382) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java 2017-05-06 07:30:20 UTC (rev 14383) @@ -684,9 +684,9 @@ * @throws Exception if the test fails */ @Test - @Alerts(CHROME = {"675", "1256", "658", "1239"}, + @Alerts(CHROME = {"636", "1256", "619", "1239"}, FF45 = {"674", "1258", "657", "1241"}, - FF52 = {"851", "1266", "834", "1249"}, + FF52 = {"674", "1258", "657", "1241"}, IE = {"705", "1256", "688", "1239"}) @NotYetImplemented // TODO width and height calculation needs to be reworked in HtmlUnit @@ -720,8 +720,7 @@ */ @Test @Alerts(DEFAULT = {"0,0", "100,200", "110,230", "0,0", "no scrollByLines()", "0,0", "no scrollByPages()"}, - FF45 = {"0,0", "100,200", "110,230", "0,0", "0,95", "0,0", "0,1238"}, - FF52 = {"0,0", "100,200", "110,230", "0,0", "0,95", "0,0", "0,1592"}) + FF = {"0,0", "100,200", "110,230", "0,0", "0,95", "0,0", "0,1238"}) @NotYetImplemented(FF) public void scrolling1() throws Exception { scrolling(true); @@ -809,16 +808,15 @@ * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"undefined", "undefined", "undefined"}, - FF45 = {"11", "91", "0"}, - FF52 = {"11", "91", "8"}) - public void mozInnerScreenX() throws Exception { + @Alerts(DEFAULT = {"undefined", "undefined"}, + FF45 = {"11", "91"}, + FF52 = {"11", "91"}) + public void mozInnerScreen() throws Exception { final String html = "<html><body onload='test()'><script>\n" + "function test() {\n" + " alert(window.mozInnerScreenX);\n" + " alert(window.mozInnerScreenY);\n" - + " alert(window.mozPaintCount);\n" + "}\n" + "</script>\n" + "</body></html>"; @@ -829,6 +827,23 @@ * @throws Exception if the test fails */ @Test + @Alerts(DEFAULT = "undefined", + FF = "number") + public void mozPaintCount() throws Exception { + final String html + = "<html><body onload='test()'><script>\n" + + "function test() {\n" + + " alert(typeof window.mozPaintCount);\n" + + "}\n" + + "</script>\n" + + "</body></html>"; + loadPageWithAlerts2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test @Alerts({"exception", "exception", "Success"}) public void eval() throws Exception { final String html |