From: <rb...@us...> - 2017-07-21 10:01:16
|
Revision: 14682 http://sourceforge.net/p/htmlunit/code/14682 Author: rbri Date: 2017-07-21 10:01:12 +0000 (Fri, 21 Jul 2017) Log Message: ----------- ff52, chrome and flash update Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java 2017-07-21 09:31:25 UTC (rev 14681) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java 2017-07-21 10:01:12 UTC (rev 14682) @@ -153,9 +153,9 @@ /** Latest Chrome. */ public static final BrowserVersion CHROME = new BrowserVersion( NETSCAPE, "5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36" - + " (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36", + + " (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36" - + " (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36", + + " (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36", 59, "Chrome", null); /** Microsoft Edge. Work In Progress!!! */ @@ -191,7 +191,7 @@ // FF52 FIREFOX_52.initDefaultFeatures(); FIREFOX_52.setVendor(""); - FIREFOX_52.buildId_ = "20170607123825"; + FIREFOX_52.buildId_ = "20170627155318"; FIREFOX_52.setHeaderNamesOrdered(new String[] { "Host", "User-Agent", "Accept", "Accept-Language", "Accept-Encoding", "Referer", "Cookie", "Connection", "Upgrade-Insecure-Requests"}); FIREFOX_52.setHtmlAcceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); @@ -327,19 +327,19 @@ CHROME.getPlugins().add(flash); flash = new PluginConfiguration("Shockwave Flash", - "Shockwave Flash 26.0 r0", "26.0.0.131", "NPSWF32_26_0_0_131.dll"); + "Shockwave Flash 26.0 r0", "26.0.0.137", "NPSWF32_26_0_0_137.dll"); flash.getMimeTypes().add(new PluginConfiguration.MimeType("application/x-shockwave-flash", "Shockwave Flash", "swf")); FIREFOX_45.getPlugins().add(flash); flash = new PluginConfiguration("Shockwave Flash", - "Shockwave Flash 26.0 r0", "26.0.0.131", "NPSWF64_26_0_0_131.dll"); + "Shockwave Flash 26.0 r0", "26.0.0.137", "NPSWF64_26_0_0_137.dll"); flash.getMimeTypes().add(new PluginConfiguration.MimeType("application/x-shockwave-flash", "Shockwave Flash", "swf")); FIREFOX_52.getPlugins().add(flash); flash = new PluginConfiguration("Shockwave Flash", - "Shockwave Flash 26.0 r0", "26.0.0.131", "Flash32_26_0_0_131.ocx"); + "Shockwave Flash 26.0 r0", "26.0.0.137", "Flash32_26_0_0_137.ocx"); flash.getMimeTypes().add(new PluginConfiguration.MimeType("application/x-shockwave-flash", "Shockwave Flash", "swf")); INTERNET_EXPLORER.getPlugins().add(flash); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java 2017-07-21 09:31:25 UTC (rev 14681) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java 2017-07-21 10:01:12 UTC (rev 14682) @@ -18,6 +18,7 @@ import org.junit.Test; import org.junit.runner.RunWith; +import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import com.gargoylesoftware.htmlunit.BrowserRunner; @@ -179,27 +180,32 @@ + "<head>\n" + " <title>test</title>\n" + " <script>\n" - + " function doTest() {\n" + + " function log(text) {\n" + + " var textarea = document.getElementById('myTextarea');\n" + + " textarea.value += text + ',';\n" + + " }\n" - + " var names = [];" - + " for (var i = 0; i < window.navigator.plugins.length; i++) {\n" - + " names[i] = window.navigator.plugins[i].name;\n" - + " }\n" + + " function doTest() {\n" + + " var names = [];" + + " for (var i = 0; i < window.navigator.plugins.length; i++) {\n" + + " names[i] = window.navigator.plugins[i].name;\n" + + " }\n" // there is no fixed order, sort for stable testing + " name = names.sort().join('; ');\n" - + " alert(names);\n" + + " log(names);\n" + " }\n" + " </script>\n" + "</head>\n" + "<body onload='doTest()'>\n" + + " <textarea id='myTextarea' cols='80' rows='10'></textarea>\n" + "</body>\n" + "</html>"; - final WebDriver driver = loadPage2(html); - final List<String> alerts = getCollectedAlerts(driver, 1); + final WebDriver driver = loadPageWithAlerts2(html); + final String alerts = driver.findElement(By.id("myTextarea")).getAttribute("value"); for (PluginConfiguration plugin : getBrowserVersion().getPlugins()) { - assertTrue(plugin.getName() + " not found", alerts.get(0).contains(plugin.getName())); + assertTrue(plugin.getName() + " not found", alerts.contains(plugin.getName())); } } @@ -208,10 +214,10 @@ * @throws Exception on test failure */ @Test - @Alerts(FF45 = {"Shockwave Flash", "Shockwave Flash 26.0 r0", "26.0.0.131", "NPSWF32_26_0_0_131.dll"}, - FF52 = {"Shockwave Flash", "Shockwave Flash 26.0 r0", "26.0.0.131", "NPSWF64_26_0_0_131.dll"}, + @Alerts(FF45 = {"Shockwave Flash", "Shockwave Flash 26.0 r0", "26.0.0.137", "NPSWF32_26_0_0_137.dll"}, + FF52 = {"Shockwave Flash", "Shockwave Flash 26.0 r0", "26.0.0.137", "NPSWF64_26_0_0_137.dll"}, CHROME = {"Shockwave Flash", "Shockwave Flash 24.0 r0", "undefined", "internal-not-yet-present"}, - IE = {"Shockwave Flash", "Shockwave Flash 26.0 r0", "26.0.0.131", "Flash32_26_0_0_131.ocx"}, + IE = {"Shockwave Flash", "Shockwave Flash 26.0 r0", "26.0.0.137", "Flash32_26_0_0_137.ocx"}, EDGE = {"Shockwave Flash", "Shockwave Flash 18.0 r0", "18.0.0.232", "Flash.ocx"}) public void pluginsShockwaveFlash() throws Exception { final String html = "<html>\n" @@ -374,7 +380,7 @@ @Test @Alerts(DEFAULT = "undefined", FF45 = "20170411115307", - FF52 = "20170607123825") + FF52 = "20170627155318") public void buildID() throws Exception { final String html = "<html><head><title>First</title>\n" |