From: <rb...@us...> - 2018-06-27 09:55:17
|
Revision: 15388 http://sourceforge.net/p/htmlunit/code/15388 Author: rbri Date: 2018-06-27 09:55:10 +0000 (Wed, 27 Jun 2018) Log Message: ----------- ff60 support (wip) Modified Paths: -------------- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x11x3Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x8x2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/runners/BrowserStatement.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/source/JQueryExtractor.java trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.FF52.txt trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.IE.txt Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x11x3Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x11x3Test.java 2018-06-27 06:36:31 UTC (rev 15387) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x11x3Test.java 2018-06-27 09:55:10 UTC (rev 15388) @@ -1213,9 +1213,7 @@ * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "1, 1, 2", - IE = "0, 2, 2") - @NotYetImplemented(IE) + @Alerts("1, 1, 2") public void support__Check_CSP__https___developer_mozilla_org_en_US_docs_Security_CSP__restrictions() throws Exception { runTest("support: Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions"); } @@ -1856,7 +1854,8 @@ * @throws Exception if an error occurs */ @Test - @Alerts("0, 4, 4") + @Alerts(CHROME = "0, 4, 4", + FF = "0, 4, 4") public void attributes__val___respects_numbers_without_exception__Bug__9319_() throws Exception { runTest("attributes: val() respects numbers without exception (Bug #9319)"); } @@ -2927,7 +2926,8 @@ * @throws Exception if an error occurs */ @Test - @Alerts("0, 2, 2") + @Alerts(CHROME = "0, 2, 2", + IE = "0, 2, 2") public void event__Check_order_of_focusin_focusout_events() throws Exception { runTest("event: Check order of focusin/focusout events"); } @@ -2937,7 +2937,8 @@ * @throws Exception if an error occurs */ @Test - @Alerts("0, 5, 5") + @Alerts(CHROME = "0, 5, 5", + IE = "0, 5, 5") public void event__focus_blur_order___12868_() throws Exception { runTest("event: focus-blur order (#12868)"); } @@ -7609,9 +7610,7 @@ * @throws Exception if an error occurs */ @Test - @Alerts(CHROME = "0, 2, 2", - FF52 = "0, 1, 1", - FF60 = "0, 2, 2", + @Alerts(DEFAULT = "0, 2, 2", IE = "0, 1, 1") @NotYetImplemented(IE) public void effects__non_px_animation_handles_non_numeric_start___11971_() throws Exception { Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x8x2Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x8x2Test.java 2018-06-27 06:36:31 UTC (rev 15387) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/JQuery1x8x2Test.java 2018-06-27 09:55:10 UTC (rev 15388) @@ -1645,7 +1645,8 @@ * @throws Exception if an error occurs */ @Test - @Alerts("0, 4, 4") + @Alerts(CHROME = "0, 4, 4", + FF = "0, 4, 4") public void attributes__val___respects_numbers_without_exception__Bug__9319_() throws Exception { runTest("attributes: val() respects numbers without exception (Bug #9319)"); } @@ -4370,8 +4371,7 @@ * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "0, 2, 2", - IE = "2, 0, 2") + @Alerts("0, 2, 2") public void ajax__jQuery_ajax___HEAD_requests() throws Exception { runTest("ajax: jQuery.ajax - HEAD requests"); } @@ -6168,9 +6168,7 @@ * @throws Exception if an error occurs */ @Test - @Alerts(CHROME = "0, 2, 2", - FF52 = "0, 1, 1", - FF60 = "0, 2, 2", + @Alerts(DEFAULT = "0, 2, 2", IE = "0, 1, 1") @NotYetImplemented(IE) public void effects__non_px_animation_handles_non_numeric_start___11971_() throws Exception { Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/runners/BrowserStatement.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/runners/BrowserStatement.java 2018-06-27 06:36:31 UTC (rev 15387) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/runners/BrowserStatement.java 2018-06-27 09:55:10 UTC (rev 15388) @@ -86,13 +86,20 @@ assertNotEquals(alerts.FF60(), alerts.DEFAULT()); assertNotEquals(alerts.FF52(), alerts.DEFAULT()); - assertNotEquals(alerts.FF(), alerts.CHROME()); - assertNotEquals(alerts.IE(), alerts.CHROME()); - assertNotEquals(alerts.IE(), alerts.FF()); assertNotEquals(alerts.FF60(), alerts.FF()); assertNotEquals(alerts.FF52(), alerts.FF()); + if (BrowserVersionClassRunner.isDefined(alerts.IE())) { + assertNotEquals(alerts.FF(), alerts.CHROME()); + } + if (BrowserVersionClassRunner.isDefined(alerts.FF())) { + assertNotEquals(alerts.IE(), alerts.CHROME()); + } + if (BrowserVersionClassRunner.isDefined(alerts.CHROME())) { + assertNotEquals(alerts.IE(), alerts.FF()); + } } } + final AlertsStandards alerts2 = method_.getAnnotation(AlertsStandards.class); if (alerts2 != null) { if (!BrowserVersionClassRunner.isDefined(alerts2.value())) { @@ -102,11 +109,17 @@ assertNotEquals(alerts2.FF60(), alerts2.DEFAULT()); assertNotEquals(alerts2.FF52(), alerts2.DEFAULT()); - assertNotEquals(alerts2.FF(), alerts2.CHROME()); - assertNotEquals(alerts2.IE(), alerts2.CHROME()); - assertNotEquals(alerts2.IE(), alerts2.FF()); assertNotEquals(alerts2.FF60(), alerts2.FF()); assertNotEquals(alerts2.FF52(), alerts2.FF()); + if (BrowserVersionClassRunner.isDefined(alerts2.IE())) { + assertNotEquals(alerts2.FF(), alerts2.CHROME()); + } + if (BrowserVersionClassRunner.isDefined(alerts2.FF())) { + assertNotEquals(alerts2.IE(), alerts2.CHROME()); + } + if (BrowserVersionClassRunner.isDefined(alerts2.CHROME())) { + assertNotEquals(alerts2.IE(), alerts2.FF()); + } } } } Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/source/JQueryExtractor.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/source/JQueryExtractor.java 2018-06-27 06:36:31 UTC (rev 15387) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/source/JQueryExtractor.java 2018-06-27 09:55:10 UTC (rev 15388) @@ -43,7 +43,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser; import com.gargoylesoftware.htmlunit.WebDriverTestCase; -import com.gargoylesoftware.htmlunit.libraries.JQuery1x8x2Test; +import com.gargoylesoftware.htmlunit.libraries.JQuery1x11x3Test; /** * Extracts the needed expectation from the real browsers output, this is done by waiting the browser to finish @@ -72,16 +72,17 @@ * @throws Exception s */ public static void main(final String[] args) throws Exception { - final Class<? extends WebDriverTestCase> testClass = JQuery1x8x2Test.class; + final Class<? extends WebDriverTestCase> testClass = JQuery1x11x3Test.class; // final String browser = "FF60"; - final String browser = "CHROME"; + // final String browser = "FF52"; + // final String browser = "CHROME"; // final String browser = "IE"; final String version = (String) MethodUtils.invokeExactMethod(testClass.newInstance(), "getVersion"); final File baseDir = new File("src/test/resources/libraries/jQuery/" + version + "/expectations"); - extractExpectations(new File(baseDir, browser + ".out"), new File(baseDir, "results." + browser + ".txt")); + // extractExpectations(new File(baseDir, browser + ".out"), new File(baseDir, "results." + browser + ".txt")); generateTestCases(testClass, baseDir); } @@ -106,7 +107,7 @@ // if (line.startsWith("" + testNumber + '.') && endPos > -1) { if (endPos > -1) { line = line.substring(0, endPos); - writer.write(line + "\n"); + writer.write(line + System.lineSeparator()); testNumber++; } else if (line.endsWith("Rerun")) { @@ -116,7 +117,7 @@ break; } line = "" + testNumber + '.' + ' ' + line.substring(0, line.length() - 5); - writer.write(line + "\n"); + writer.write(line + System.lineSeparator()); testNumber++; } } @@ -231,12 +232,11 @@ } Collections.sort(cleanedBrowserNames); - if (testExpectation.size() == 2) { + if (testExpectation.size() == 3) { if (StringUtils.equals( testExpectation.get(TestedBrowser.CHROME.name()), testExpectation.get("FF"))) { testExpectation.put("DEFAULT", testExpectation.get(TestedBrowser.CHROME.name())); - testExpectation.put(TestedBrowser.IE.name(), ""); testExpectation.remove(TestedBrowser.CHROME.name()); testExpectation.remove("FF"); cleanedBrowserNames.remove(TestedBrowser.CHROME.name()); @@ -247,7 +247,6 @@ testExpectation.get(TestedBrowser.CHROME.name()), testExpectation.get(TestedBrowser.IE.name()))) { testExpectation.put("DEFAULT", testExpectation.get(TestedBrowser.CHROME.name())); - testExpectation.put("FF", ""); testExpectation.remove(TestedBrowser.CHROME.name()); testExpectation.remove(TestedBrowser.IE.name()); cleanedBrowserNames.remove(TestedBrowser.CHROME.name()); @@ -254,29 +253,7 @@ cleanedBrowserNames.remove(TestedBrowser.IE.name()); cleanedBrowserNames.add(0, "DEFAULT"); } - } - else if (testExpectation.size() == 3) { - if (StringUtils.equals( - testExpectation.get(TestedBrowser.CHROME.name()), - testExpectation.get("FF"))) { - testExpectation.put("DEFAULT", testExpectation.get(TestedBrowser.CHROME.name())); - testExpectation.remove(TestedBrowser.CHROME.name()); - testExpectation.remove("FF"); - cleanedBrowserNames.remove(TestedBrowser.CHROME.name()); - cleanedBrowserNames.remove("FF"); - cleanedBrowserNames.add(0, "DEFAULT"); - } else if (StringUtils.equals( - testExpectation.get(TestedBrowser.CHROME.name()), - testExpectation.get(TestedBrowser.IE.name()))) { - testExpectation.put("DEFAULT", testExpectation.get(TestedBrowser.CHROME.name())); - testExpectation.remove(TestedBrowser.CHROME.name()); - testExpectation.remove(TestedBrowser.IE.name()); - cleanedBrowserNames.remove(TestedBrowser.CHROME.name()); - cleanedBrowserNames.remove(TestedBrowser.IE.name()); - cleanedBrowserNames.add(0, "DEFAULT"); - } - else if (StringUtils.equals( testExpectation.get("FF"), testExpectation.get(TestedBrowser.IE.name()))) { testExpectation.put("DEFAULT", testExpectation.get("FF")); Modified: trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.FF52.txt =================================================================== --- trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.FF52.txt 2018-06-27 06:36:31 UTC (rev 15387) +++ trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.FF52.txt 2018-06-27 09:55:10 UTC (rev 15388) @@ -752,7 +752,7 @@ effects: Handle queue:false promises (0, 10, 10) effects: multiple unqueued and promise (0, 4, 4) effects: animate does not change start value for non-px animation (#7109) (0, 1, 1) -effects: non-px animation handles non-numeric start (#11971) (0, 1, 1) +effects: non-px animation handles non-numeric start (#11971) (0, 2, 2) effects: Animation callbacks (#11797) (0, 15, 15) effects: Animate properly sets overflow hidden when animating width/height (#12117) (0, 8, 8) effects: Each tick of the timer loop uses a fresh time (#12837) (0, 3, 3) Modified: trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.IE.txt =================================================================== --- trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.IE.txt 2018-06-27 06:36:31 UTC (rev 15387) +++ trunk/htmlunit/src/test/resources/libraries/jQuery/1.11.3/expectations/results.IE.txt 2018-06-27 09:55:10 UTC (rev 15388) @@ -114,7 +114,7 @@ 114.support: body background is not lost if set prior to loading jQuery (#9239) (0, 2, 2) 115.support: A background on the testElement does not cause IE8 to crash (#9823) (0, 1, 1) 116.support: box-sizing does not affect jQuery.support.shrinkWrapBlocks (0, 1, 1) -117.support: Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions (0, 2, 2) +117.support: Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions (1, 1, 2) 118.support: Verify that the support tests resolve as expected per browser (0, 34, 34) 119.data: expando (0, 1, 1) 120.data: jQuery.data(div) (0, 25, 25) |