Re: [PATCH] add test on host value of InternetConnectW
On 24.11.2015 16:02, Hao Peng wrote:
Add a test on giving host value of InternetConnectionW.
Some App fill host param with port number when calling InternetConnectionW. it will still operate successfull on system brove windows 2000.
I tested to connect to [www.winehq.org], but I got GetLastError with 2 on WinXP and Win2003, other systems were fine. (See https://testbot.winehq.org/JobDetails.pl?Key=18484) All fine when I tested to connecting to [www.bing.com]. (https://testbot.winehq.org/JobDetails.pl?Key=18482) And I didn't get what happened.
I plan to send a patch to fix this later.
Any comments are welcome.
Signed-off-by: Hao Peng <penghao(a)linuxdeepin.com> --- dlls/wininet/tests/http.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
+ connect = InternetConnectA(session, "www.bing.com:21", INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, + INTERNET_SERVICE_HTTP, 0, 0); + ok(connect != NULL, "InternetConnect failed\n");
I think we prefer winehq.org as test url domain.
+ SetLastError(0xdeadbeef); + ret = HttpSendRequestA(request, NULL, 0, NULL, 0); + error = GetLastError(); + ok(ret || broken(!ret /* win2000 */), "HttpSendRequest failed\n"); + ok(error == 0 || broken(error == ERROR_INTERNET_NAME_NOT_RESOLVED /* win2000 */), "got %u\n", error);
Windows 2000 is not in a base set of tested versions anymore, you can probably drop special handling for it.
I plan to send a patch to fix this later.
What this patch will fix? I don't see any todos or other ways to skip in your test patch.
participants (1)
-
Nikolay Sivov