[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-develop
Subject:    [HtmlUnit] SVN: [8719] trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/
From:       rbri () users ! sourceforge ! net
Date:       2013-10-31 20:34:36
Message-ID: E1Vbywy-0001xb-Ml () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 8719
          http://sourceforge.net/p/htmlunit/code/8719
Author:   rbri
Date:     2013-10-31 20:34:35 +0000 (Thu, 31 Oct 2013)
Log Message:
-----------
fix browser language related test

Modified Paths:
--------------
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/WebClient2Test.java

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/WebClient2Test.java
 ===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/WebClient2Test.java	2013-10-31 \
                18:46:07 UTC (rev 8718)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/WebClient2Test.java	2013-10-31 \
20:34:35 UTC (rev 8719) @@ -246,14 +246,15 @@
     public void acceptLanguage() throws Exception {
         final String html = "<html><body></body></html>";
         final HtmlPage p = loadPageWithAlerts(html);
-        assertEquals("en-us", \
p.getWebResponse().getWebRequest().getAdditionalHeaders().get("Accept-Language")); +  \
// browsers are using different casing, but this is not relevant for this test +      \
assertEquals("en-us", \
getMockWebConnection().getLastAdditionalHeaders().get("Accept-Language").toLowerCase());
  
         final WebClient client = p.getWebClient();
         final String lang = client.getBrowserVersion().getBrowserLanguage();
         try {
             client.getBrowserVersion().setBrowserLanguage("fr");
-            final HtmlPage p2 = client.getPage(getDefaultUrl());
-            assertEquals("fr", \
p2.getWebResponse().getWebRequest().getAdditionalHeaders().get("Accept-Language")); + \
client.getPage(getDefaultUrl()); +            assertEquals("fr", \
getMockWebConnection().getLastAdditionalHeaders().get("Accept-Language"));  }
         finally {
             // Restore original language.


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic