From: <rb...@us...> - 2018-06-29 07:03:17
|
Revision: 15404 http://sourceforge.net/p/htmlunit/code/15404 Author: rbri Date: 2018-06-29 07:03:11 +0000 (Fri, 29 Jun 2018) Log Message: ----------- ff60 support (wip) Modified Paths: -------------- 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/javascript/host/Window.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-06-29 06:48:00 UTC (rev 15403) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java 2018-06-29 07:03:11 UTC (rev 15404) @@ -1841,7 +1841,7 @@ */ @JsxGetter(FF) public int getMozInnerScreenY() { - return 91; + return 83; } /** 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 2018-06-29 06:48:00 UTC (rev 15403) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java 2018-06-29 07:03:11 UTC (rev 15404) @@ -15,6 +15,7 @@ package com.gargoylesoftware.htmlunit.javascript.host; import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; +import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF52; import org.junit.Test; import org.junit.runner.RunWith; @@ -880,6 +881,7 @@ @Alerts(DEFAULT = {"undefined", "undefined"}, FF52 = {"11", "91"}, FF60 = {"11", "83"}) + @NotYetImplemented(FF52) public void mozInnerScreen() throws Exception { final String html = "<html><body onload='test()'><script>\n" @@ -1144,14 +1146,11 @@ @Test @Alerts(DEFAULT = { "string string 7 number string", - "string string 8 number object", - "string string 9 number object", - "string string 1 number object"}, + "string string 8 number object"}, FF = { "string string 0 number string", - "string string 0 number object", - "string string 9 number object", - "string string 1 number object"}) + "string string 0 number object"}) + @NotYetImplemented(FF) public void onErrorExceptionInstance() throws Exception { final String html = "<html>\n" @@ -1163,6 +1162,29 @@ + "</script>\n" + "<script>throw 'string';</script>\n" + "<script>throw {'object':'property'};</script>\n" + + "</html>"; + + if (getWebDriver() instanceof HtmlUnitDriver) { + getWebWindowOf((HtmlUnitDriver) getWebDriver()).getWebClient() + .getOptions().setThrowExceptionOnScriptError(false); + } + loadPageWithAlerts2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"string string 7 number object", "string string 1 number object"}) + public void onErrorExceptionInstance2() throws Exception { + final String html + = "<html>\n" + + "<script>\n" + + " window.onerror = function(messageOrEvent, source, lineno, colno, error) {\n" + + " alert(typeof messageOrEvent + ' ' + typeof source + ' '" + + " + lineno + ' ' + typeof colno + ' ' + typeof error);\n" + + " };\n" + + "</script>\n" + "<script>does.not.exist();</script>\n" + "<script>eval('syntax[error');</script>\n" + "</html>"; |