Title: [207390] trunk/Tools
Revision
207390
Author
carlo...@webkit.org
Date
2016-10-16 02:27:44 -0700 (Sun, 16 Oct 2016)

Log Message

Unreviewed. Fix GTK+ unit test /webkit2/WebKitWebContext/languages after r206949.

After r206949 navigator.language returns en-US instead of en-us. Language tags in Accept-Language header are
actually case-insensitive, so we should actually do case-insensitive comparisons, but we only have
g_assert_cmpstr for tests.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextLanguages):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (207389 => 207390)


--- trunk/Tools/ChangeLog	2016-10-16 09:11:18 UTC (rev 207389)
+++ trunk/Tools/ChangeLog	2016-10-16 09:27:44 UTC (rev 207390)
@@ -1,5 +1,16 @@
 2016-10-16  Carlos Garcia Campos  <cgar...@igalia.com>
 
+        Unreviewed. Fix GTK+ unit test /webkit2/WebKitWebContext/languages after r206949.
+
+        After r206949 navigator.language returns en-US instead of en-us. Language tags in Accept-Language header are
+        actually case-insensitive, so we should actually do case-insensitive comparisons, but we only have
+        g_assert_cmpstr for tests.
+
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
+        (testWebContextLanguages):
+
+2016-10-16  Carlos Garcia Campos  <cgar...@igalia.com>
+
         [GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame
         https://bugs.webkit.org/show_bug.cgi?id=163389
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp (207389 => 207390)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp	2016-10-16 09:11:18 UTC (rev 207389)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp	2016-10-16 09:27:44 UTC (rev 207390)
@@ -465,7 +465,7 @@
 
 static void testWebContextLanguages(WebViewTest* test, gconstpointer)
 {
-    static const char* expectedDefaultLanguage = "en-us";
+    static const char* expectedDefaultLanguage = "en-US";
     test->loadURI(kServer->getURIForPath("/").data());
     test->waitUntilLoadFinished();
     size_t mainResourceDataSize = 0;
@@ -496,7 +496,7 @@
     g_assert(_javascript_Result);
     g_assert(!error);
     GUniquePtr<char> locale(WebViewTest::_javascript_ResultToCString(_javascript_Result));
-    g_assert_cmpstr(locale.get(), ==, "en-US");
+    g_assert_cmpstr(locale.get(), ==, expectedDefaultLanguage);
 
     // When using the POSIX locale, en-US should be used as default.
     const char* posixLanguage[] = { "POSIX", nullptr };
@@ -505,7 +505,7 @@
     g_assert(_javascript_Result);
     g_assert(!error);
     locale.reset(WebViewTest::_javascript_ResultToCString(_javascript_Result));
-    g_assert_cmpstr(locale.get(), ==, "en-US");
+    g_assert_cmpstr(locale.get(), ==, expectedDefaultLanguage);
 
     // An invalid locale should throw an exception.
     const char* invalidLanguage[] = { "A", nullptr };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to