Signed-off-by: Sven Baars sven.wine@gmail.com --- What happened with the previous test was that on machines where it succeeded a file was created with the name "actualuser@_user@http_[1]". This appears to be because the file name is split on ":", and the space is replaced by "_". Now when we remove "http://" CreateUrlCacheEntryW and CreateUrlCacheEntryA will actually create files with different names (because of encoding differences), which means the test fails. When we remove the "user@" (which would make sense since the file start with "actualuser@user@" instead of just "user@") CreateUrlCacheEntryW fails with ERROR_INVALID_PARAMETER. So I instead just changed it to not include the unicode characters.
dlls/wininet/tests/urlcache.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c index c5e72ae82b..a38ed9bc5b 100644 --- a/dlls/wininet/tests/urlcache.c +++ b/dlls/wininet/tests/urlcache.c @@ -877,9 +877,8 @@ static void test_urlcacheW(void) "", {0}, {0} }, { - 0, {'C','o','o','k','i','e',':',' ','u','s','e','r','@','h','t','t','p', - ':','/','/','t',0x15b,0x107,'.','o','r','g','/',0}, - "Cookie: user@http://t%5Cxc5%5Cx9b%5Cxc4%5Cx87.org/", {0}, {0} + 0, {'C','o','o','k','i','e',':',' ','u','s','e','r','@','t','e','s','t','.','o','r','g','/',0}, + "Cookie: user@test.org/", {0}, {0} } }; static const FILETIME filetime_zero; @@ -893,24 +892,11 @@ static void test_urlcacheW(void) return; }
- if(ie10_cache) { - if(!MultiByteToWideChar(CP_ACP, 0, urls[6].encoded_url, -1, - urls[6].url, ARRAY_SIZE(urls[6].url))) - urls[6].url[0] = 0; - - trace("converted url in test 6: %s\n", wine_dbgstr_w(urls[6].url)); - } - for(i=0; i<ARRAY_SIZE(urls); i++) { INTERNET_CACHE_ENTRY_INFOA *entry_infoA; INTERNET_CACHE_ENTRY_INFOW *entry_infoW; DWORD size;
- if(!urls[i].url[0]) { - win_skip("No UTF16 version of url (%d)\n", i); - continue; - } - SetLastError(0xdeadbeef); ret = CreateUrlCacheEntryW(urls[i].url, 0, NULL, bufW, 0); if(urls[i].err != 0) { @@ -937,10 +923,6 @@ static void test_urlcacheW(void) ret = GetUrlCacheEntryInfoA(urls[i].encoded_url, NULL, &size); ok(!ret && GetLastError()==ERROR_INSUFFICIENT_BUFFER, "%d) GetLastError() = %d\n", i, GetLastError()); - if(!ret && GetLastError()!=ERROR_INSUFFICIENT_BUFFER) { - win_skip("ANSI version of url is incorrect\n"); - continue; - } entry_infoA = HeapAlloc(GetProcessHeap(), 0, size); ret = GetUrlCacheEntryInfoA(urls[i].encoded_url, entry_infoA, &size); ok(ret, "%d) GetUrlCacheEntryInfoA failed: %d\n", i, GetLastError());