Fix wininet http tests regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The current tests have some hardcoded URL that must have meant something
to the author but is meaningless to me. It also no longer resolves. 

ChangeLog:
Change URL used in http tests to be a #define so it can be changed easily
in future, and make it point to winehq

Index: dlls/wininet/tests/http.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/tests/http.c,v
retrieving revision 1.10
diff -u -r1.10 http.c
--- dlls/wininet/tests/http.c   25 Sep 2003 20:29:40 -0000      1.10
+++ dlls/wininet/tests/http.c   15 Jan 2004 22:53:17 -0000
@@ -8,6 +8,9 @@
  
 #include "wine/test.h"
  
+#define FOO_URL "http://www.winehq.org/site/about";
+#define FOO_URL_PATH "/site/about"
+
 int goon = 0;
  
 VOID WINAPI callback(
@@ -217,7 +220,7 @@
   myhinternet = InternetOpen("Winetest",0,NULL,NULL,INTERNET_FLAG_NO_CACHE_WRITE);
   ok((myhinternet != 0), "InternetOpen failed, error %lx\n",GetLastError());
   size = 0x400;
-  ok (InternetCanonicalizeUrl("http://LTspice.linear-tech.com/fieldsync2/release.log.gz",buffer, &size,ICU_BROWSER_MODE),
+  ok (InternetCanonicalizeUrl(FOO_URL, buffer, &size,ICU_BROWSER_MODE),
       "InternetCanonicalizeUrl failed, error %lx\n",GetLastError());
    
   urlComponents.dwStructSize = sizeof(URL_COMPONENTSA);
@@ -233,10 +236,10 @@
   urlComponents.dwUrlPathLength = 2048;
   urlComponents.lpszExtraInfo = extra;
   urlComponents.dwExtraInfoLength = 1024;
-  ok((InternetCrackUrl("http://LTspice.linear-tech.com/fieldsync2/release.log.gz";, 0,0,&urlComponents)),
+  ok((InternetCrackUrl(FOO_URL, 0,0,&urlComponents)),
      "InternetCrackUrl failed, error %lx\n",GetLastError());
   SetLastError(0);
-  myhttp = InternetOpenUrl(myhinternet, "http://LTspice.linear-tech.com/fieldsync2/release.log.gz";, 0, 0,
+  myhttp = InternetOpenUrl(myhinternet, FOO_URL, 0, 0,
                           INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_TRANSFER_BINARY,0);
   if (GetLastError() == 12007)
     return; /* WinXP returns this when not connected to the net */
@@ -267,9 +270,9 @@
   urlComponents.dwUrlPathLength = 2048;
   urlComponents.lpszExtraInfo = extra;
   urlComponents.dwExtraInfoLength = 1024;
-  ok((InternetCrackUrl("http://LTspice.linear-tech.com/fieldsync2/release.log.gz";, 0,0,&urlComponents)),
+  ok((InternetCrackUrl(FOO_URL, 0,0,&urlComponents)),
      "InternetCrackUrl failed, error %lx\n",GetLastError());
-  ok((strcmp("/fieldsync2/release.log.gz",path) == 0),"path cracked wrong");
+  ok((strcmp(FOO_URL_PATH,path) == 0),"path cracked wrong");
 }
  
 START_TEST(http)




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux