Module: wine Branch: master Commit: e5574369ddebd8788c8710331581a02347a3261d URL: http://source.winehq.org/git/wine.git/?a=commit;h=e5574369ddebd8788c87103315...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Dec 28 21:21:53 2009 +0100
wininet: Fixed tests on older IEs.
---
dlls/wininet/tests/url.c | 46 +++++++++++++++++++++++++++------------------- 1 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c index f811882..1f012f0 100644 --- a/dlls/wininet/tests/url.c +++ b/dlls/wininet/tests/url.c @@ -218,35 +218,40 @@ static void test_crack_url(const crack_url_test_t *test)
ok(urlw.nScheme == test->scheme, "[%s] urlw.nScheme = %d, expected %d\n", test->url, urlw.nScheme, test->scheme);
- if(test->host_off == -1) + if(test->host_off == -1) { ok(!urlw.lpszHostName, "[%s] urlw.lpszHostName = %p, expected NULL\n", test->url, urlw.lpszHostName); - else + ok(urlw.dwHostNameLength == 0 || broken(urlw.dwHostNameLength == 1), "[%s] urlw.lpszHostNameLength = %d, expected %d\n", + test->url, urlw.dwHostNameLength, test->host_len); + }else { ok(urlw.lpszHostName == buf+test->host_off, "[%s] urlw.lpszHostName = %p, expected %p\n", test->url, urlw.lpszHostName, test->url+test->host_off); - if(test->host_skip_broken != -1 && urlw.dwHostNameLength == test->host_skip_broken) { - win_skip("skipping broken dwHostNameLength result\n"); - return; + ok(urlw.dwHostNameLength == test->host_len, "[%s] urlw.lpszHostNameLength = %d, expected %d\n", + test->url, urlw.dwHostNameLength, test->host_len); } - ok(urlw.dwHostNameLength == test->host_len, "[%s] urlw.lpszHostNameLength = %d, expected %d\n", - test->url, urlw.dwHostNameLength, test->host_len);
ok(urlw.nPort == test->port, "[%s] nPort = %d, expected %d\n", test->url, urlw.nPort, test->port);
- if(test->user_off == -1) + if(test->user_off == -1) { ok(!urlw.lpszUserName, "[%s] urlw.lpszUserName = %p\n", test->url, urlw.lpszUserName); - else + ok(urlw.dwUserNameLength == 0 || broken(urlw.dwUserNameLength == 1), "[%s] urlw.lpszUserNameLength = %d, expected %d\n", + test->url, urlw.dwUserNameLength, test->user_len); + }else { ok(urlw.lpszUserName == buf+test->user_off, "[%s] urlw.lpszUserName = %p, expected %p\n", test->url, urlw.lpszUserName, buf+test->user_off); - ok(urlw.dwUserNameLength == test->user_len, "[%s] urlw.lpszUserNameLength = %d, expected %d\n", - test->url, urlw.dwUserNameLength, test->user_len); + ok(urlw.dwUserNameLength == test->user_len, "[%s] urlw.lpszUserNameLength = %d, expected %d\n", + test->url, urlw.dwUserNameLength, test->user_len); + }
- if(test->pass_off == -1) + if(test->pass_off == -1) { ok(!urlw.lpszPassword, "[%s] urlw.lpszPassword = %p\n", test->url, urlw.lpszPassword); - else + ok(urlw.dwPasswordLength == 0 || broken(urlw.dwPasswordLength), "[%s] urlw.lpszPasswordLength = %d, expected %d\n", + test->url, urlw.dwPasswordLength, test->pass_len); + }else { ok(urlw.lpszPassword == buf+test->pass_off, "[%s] urlw.lpszPassword = %p, expected %p\n", test->url, urlw.lpszPassword, buf+test->pass_off); - ok(urlw.dwPasswordLength == test->pass_len, "[%s] urlw.lpszPasswordLength = %d, expected %d\n", - test->url, urlw.dwPasswordLength, test->pass_len); + ok(urlw.dwPasswordLength == test->pass_len, "[%s] urlw.lpszPasswordLength = %d, expected %d\n", + test->url, urlw.dwPasswordLength, test->pass_len); + }
if(test->path_off == -1) ok(!urlw.lpszUrlPath, "[%s] urlw.lpszPath = %p, expected NULL\n", test->url, urlw.lpszUrlPath); @@ -256,13 +261,16 @@ static void test_crack_url(const crack_url_test_t *test) ok(urlw.dwUrlPathLength == test->path_len, "[%s] urlw.lpszUrlPathLength = %d, expected %d\n", test->url, urlw.dwUrlPathLength, test->path_len);
- if(test->extra_off == -1) + if(test->extra_off == -1) { ok(!urlw.lpszExtraInfo, "[%s] url.lpszExtraInfo = %p, expected NULL\n", test->url, urlw.lpszExtraInfo); - else + ok(urlw.dwExtraInfoLength == 0 || broken(urlw.dwExtraInfoLength == 1), "[%s] urlw.lpszExtraInfoLength = %d, expected %d\n", + test->url, urlw.dwExtraInfoLength, test->extra_len); + }else { ok(urlw.lpszExtraInfo == buf+test->extra_off, "[%s] urlw.lpszExtraInfo = %p, expected %p\n", test->url, urlw.lpszExtraInfo, buf+test->extra_off); - ok(urlw.dwExtraInfoLength == test->extra_len, "[%s] urlw.lpszExtraInfoLength = %d, expected %d\n", - test->url, urlw.dwExtraInfoLength, test->extra_len); + ok(urlw.dwExtraInfoLength == test->extra_len, "[%s] urlw.lpszExtraInfoLength = %d, expected %d\n", + test->url, urlw.dwExtraInfoLength, test->extra_len); + } }
static void InternetCrackUrl_test(void)