Francois Gouget : urlmon/tests: Check that .Net is present in the user-agent string.

Alexandre Julliard julliard at winehq.org
Fri May 7 15:42:03 CDT 2021


Module: wine
Branch: master
Commit: 516a6f731797cf74aa15b623faffe943780d07d8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=516a6f731797cf74aa15b623faffe943780d07d8

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri May  7 15:20:01 2021 +0200

urlmon/tests: Check that .Net is present in the user-agent string.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/urlmon/tests/misc.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c
index 2b3df65d5fc..2142e4a79e7 100644
--- a/dlls/urlmon/tests/misc.c
+++ b/dlls/urlmon/tests/misc.c
@@ -1529,6 +1529,8 @@ static void test_user_agent(void)
         if(i < 8 && i != 1)
             ok(!strcmp(ua, str2), "unexpected UA for version %u %s, expected %s\n",
                i, wine_dbgstr_a(ua), wine_dbgstr_a(str2));
+        if (winetest_debug > 1)
+            trace("version=%u user-agent=%s\n", i, wine_dbgstr_a(ua));
 
         p += check_prefix(p, "Mozilla/");
         p += check_prefix(p, i < 9 ? "4.0 (" : "5.0 (");
@@ -1544,6 +1546,7 @@ static void test_user_agent(void)
         }else if(sizeof(void*) == 8) {
             p += check_prefix(p, "Win64; ");
 #ifdef __x86_64__
+            todo_wine
             p += check_prefix(p, "x64; ");
 #endif
         }
@@ -1559,12 +1562,17 @@ static void test_user_agent(void)
         }
         if(i == 11) {
             p += check_prefix(p, "; rv:11.0) like Gecko");
+        }else if (i >= 9) {
+            p += check_prefix(p, ")");
         }else {
-            if(i != 1)
-                ok(*p == ';' || *p == ')', "unexpected suffix %s for version %u\n",
-                   wine_dbgstr_a(p), i);
-            if(i < 9)
-                p = strchr(p, ')');
+#ifdef __x86_64__
+            todo_wine
+#endif
+            /* This assumes that either p points at some property before
+             * '; .NET', or that there is more than one such occurence.
+             */
+            ok(strstr(p, "; .NET") != NULL, "no '; .NET' in %s\n", wine_dbgstr_a(p));
+            p = strchr(p, ')');
             p += check_prefix(p, ")");
         }
 




More information about the wine-cvs mailing list