From: <rb...@us...> - 2018-06-28 18:26:56
|
Revision: 15397 http://sourceforge.net/p/htmlunit/code/15397 Author: rbri Date: 2018-06-28 18:26:51 +0000 (Thu, 28 Jun 2018) Log Message: ----------- ff60 support (wip) Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-06-27 19:45:45 UTC (rev 15396) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-06-28 18:26:51 UTC (rev 15397) @@ -989,7 +989,7 @@ JS_INPUT_IGNORE_NEGATIVE_SELECTION_START, /** Chrome/FF returns null for selectionStart/selectionEnd. */ - @BrowserFeature({CHROME, FF52}) + @BrowserFeature({CHROME, FF}) JS_INPUT_NUMBER_SELECTION_START_END_NULL, /** Setting the type property of an input converts the type to lowercase. */ Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java 2018-06-27 19:45:45 UTC (rev 15396) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java 2018-06-28 18:26:51 UTC (rev 15397) @@ -57,7 +57,8 @@ final WebDriver driver = loadPageWithAlerts2(html); if (driver instanceof HtmlUnitDriver) { - if (getBrowserVersion().isChrome()) { + if (getBrowserVersion().isChrome() + || (getBrowserVersion().isFirefox() && !getBrowserVersion().isFirefox52())) { final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage(); assertTrue(HtmlUnknownElement.class.isInstance(page.getHtmlElementById("myId"))); } Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java 2018-06-27 19:45:45 UTC (rev 15396) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java 2018-06-28 18:26:51 UTC (rev 15397) @@ -22,6 +22,7 @@ import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.InvalidElementStateException; +import org.openqa.selenium.Keys; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; @@ -66,13 +67,13 @@ final WebElement t = driver.findElement(By.id("t")); t.sendKeys("123"); assertEquals("123", t.getAttribute("value")); - t.sendKeys("\b"); + t.sendKeys(Keys.BACK_SPACE); assertEquals("12", t.getAttribute("value")); - t.sendKeys("\b"); + t.sendKeys(Keys.BACK_SPACE); assertEquals("1", t.getAttribute("value")); - t.sendKeys("\b"); + t.sendKeys(Keys.BACK_SPACE); assertEquals("", t.getAttribute("value")); - t.sendKeys("\b"); + t.sendKeys(Keys.BACK_SPACE); assertEquals("", t.getAttribute("value")); } @@ -523,11 +524,8 @@ * @throws Exception if test fails */ @Test - @Alerts(DEFAULT = {"0,0", "11,11", "3,11", "3,10"}, - CHROME = {"null,null", "null,null", "exception", + @Alerts(DEFAULT = {"null,null", "null,null", "exception", "null,null", "exception", "null,null"}, - FF52 = {"null,null", "null,null", "exception", - "null,null", "exception", "null,null"}, IE = {"0,0", "0,0", "3,3", "3,10"}) public void selection2_1() throws Exception { selection2(3, 10); @@ -537,11 +535,8 @@ * @throws Exception if test fails */ @Test - @Alerts(DEFAULT = {"0,0", "11,11", "0,11", "0,11"}, - CHROME = {"null,null", "null,null", "exception", + @Alerts(DEFAULT = {"null,null", "null,null", "exception", "null,null", "exception", "null,null"}, - FF52 = {"null,null", "null,null", "exception", - "null,null", "exception", "null,null"}, IE = {"0,0", "0,0", "0,0", "0,11"}) public void selection2_2() throws Exception { selection2(-3, 15); @@ -551,11 +546,8 @@ * @throws Exception if test fails */ @Test - @Alerts(DEFAULT = {"0,0", "11,11", "10,11", "5,5"}, - CHROME = {"null,null", "null,null", "exception", + @Alerts(DEFAULT = {"null,null", "null,null", "exception", "null,null", "exception", "null,null"}, - FF52 = {"null,null", "null,null", "exception", - "null,null", "exception", "null,null"}, IE = {"0,0", "0,0", "10,10", "5,5"}) public void selection2_3() throws Exception { selection2(10, 5); @@ -600,9 +592,7 @@ * @throws Exception if test fails */ @Test - @Alerts(DEFAULT = {"0,0", "4,5", "10,10", "4,4", "1,1"}, - CHROME = {"null,null", "exception"}, - FF52 = {"null,null", "exception"}, + @Alerts(DEFAULT = {"null,null", "exception"}, IE = {"0,0", "4,5", "0,0", "0,0", "0,0"}) public void selectionOnUpdate() throws Exception { final String html = "<html>\n" @@ -652,7 +642,7 @@ final WebDriver driver = loadPage2(html); final WebElement field = driver.findElement(By.id("t")); - field.sendKeys("\n"); + field.sendKeys(Keys.ENTER); assertEquals(2, getMockWebConnection().getRequestCount()); } Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java 2018-06-27 19:45:45 UTC (rev 15396) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java 2018-06-28 18:26:51 UTC (rev 15397) @@ -14,7 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; +import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF52; import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; import static org.junit.Assert.fail; @@ -1192,7 +1192,8 @@ */ @Test @Alerts(DEFAULT = {"undefined", "Jane", "Smith", "sdg", "finished"}, - CHROME = "not available") + CHROME = "not available", + FF60 = "not available") public void showModalDialog() throws Exception { final String html1 = "<html><head><script>\n" @@ -1251,8 +1252,9 @@ */ @Test @Alerts(DEFAULT = {"undefined", "result", "finished"}, - CHROME = {"undefined", "not available"}) - @NotYetImplemented({FF, IE}) + CHROME = {"undefined", "not available"}, + FF60 = {"undefined", "not available"}) + @NotYetImplemented({FF52, IE}) public void showModalDialogWithButton() throws Exception { final String html1 = "<html><head>\n" |