wininet/tests: Fix pathLen given to InternetCrackUrlA.

Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bernhard Übelacker 2016-08-02 23:29:20 +02:00 committed by Alexandre Julliard
parent f45db432ce
commit 0fcecad8d8
1 changed files with 10 additions and 10 deletions

View File

@ -534,26 +534,26 @@ static void InternetCrackUrl_test(void)
* The last two (path and extrainfo) are the same for all versions * The last two (path and extrainfo) are the same for all versions
* of the wininet.dll. * of the wininet.dll.
*/ */
copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
firstret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); firstret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents);
firstGLE = GetLastError(); firstGLE = GetLastError();
copy_compsA(&urlSrc, &urlComponents, 32, 0, 1024, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 32, 0, 1024, 1024, 1024, 1024);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents);
GLE = GetLastError(); GLE = GetLastError();
ok(ret==firstret && (GLE==firstGLE), "InternetCrackUrl returned %d with GLE=%d (expected to return %d)\n", ok(ret==firstret && (GLE==firstGLE), "InternetCrackUrl returned %d with GLE=%d (expected to return %d)\n",
ret, GLE, firstret); ret, GLE, firstret);
copy_compsA(&urlSrc, &urlComponents, 32, 1024, 0, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 32, 1024, 0, 1024, 1024, 1024);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents);
GLE = GetLastError(); GLE = GetLastError();
ok(ret==firstret && (GLE==firstGLE), "InternetCrackUrl returned %d with GLE=%d (expected to return %d)\n", ok(ret==firstret && (GLE==firstGLE), "InternetCrackUrl returned %d with GLE=%d (expected to return %d)\n",
ret, GLE, firstret); ret, GLE, firstret);
copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 0, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 0, 1024, 1024);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents);
GLE = GetLastError(); GLE = GetLastError();
@ -569,7 +569,7 @@ static void InternetCrackUrl_test(void)
"InternetCrackUrl returned %d with GLE=%d (expected to return 0 and ERROR_INVALID_HANDLE or ERROR_INSUFFICIENT_BUFFER)\n", "InternetCrackUrl returned %d with GLE=%d (expected to return 0 and ERROR_INVALID_HANDLE or ERROR_INSUFFICIENT_BUFFER)\n",
ret, GLE); ret, GLE);
copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 0); copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 0);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents);
GLE = GetLastError(); GLE = GetLastError();
@ -586,7 +586,7 @@ static void InternetCrackUrl_test(void)
"InternetCrackUrl returned %d with GLE=%d (expected to return 0 and ERROR_INVALID_PARAMETER)\n", "InternetCrackUrl returned %d with GLE=%d (expected to return 0 and ERROR_INVALID_PARAMETER)\n",
ret, GLE); ret, GLE);
copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
ret = InternetCrackUrlA("about://host/blank", 0,0,&urlComponents); ret = InternetCrackUrlA("about://host/blank", 0,0,&urlComponents);
ok(ret, "InternetCrackUrl failed with %d\n", GetLastError()); ok(ret, "InternetCrackUrl failed with %d\n", GetLastError());
ok(!strcmp(urlComponents.lpszScheme, "about"), "lpszScheme was \"%s\" instead of \"about\"\n", urlComponents.lpszScheme); ok(!strcmp(urlComponents.lpszScheme, "about"), "lpszScheme was \"%s\" instead of \"about\"\n", urlComponents.lpszScheme);
@ -595,7 +595,7 @@ static void InternetCrackUrl_test(void)
/* try a NULL lpszUrl */ /* try a NULL lpszUrl */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
ret = InternetCrackUrlA(NULL, 0, 0, &urlComponents); ret = InternetCrackUrlA(NULL, 0, 0, &urlComponents);
GLE = GetLastError(); GLE = GetLastError();
ok(ret == FALSE, "Expected InternetCrackUrl to fail\n"); ok(ret == FALSE, "Expected InternetCrackUrl to fail\n");
@ -605,7 +605,7 @@ static void InternetCrackUrl_test(void)
* we just need to fail and not return success * we just need to fail and not return success
*/ */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
ret = InternetCrackUrlA("", 0, 0, &urlComponents); ret = InternetCrackUrlA("", 0, 0, &urlComponents);
GLE = GetLastError(); GLE = GetLastError();
ok(ret == FALSE, "Expected InternetCrackUrl to fail\n"); ok(ret == FALSE, "Expected InternetCrackUrl to fail\n");
@ -613,7 +613,7 @@ static void InternetCrackUrl_test(void)
/* Invalid Call: must set size of components structure (Windows only /* Invalid Call: must set size of components structure (Windows only
* enforces this on the InternetCrackUrlA version of the call) */ * enforces this on the InternetCrackUrlA version of the call) */
copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
urlComponents.dwStructSize = 0; urlComponents.dwStructSize = 0;
ret = InternetCrackUrlA(TEST_URL, 0, 0, &urlComponents); ret = InternetCrackUrlA(TEST_URL, 0, 0, &urlComponents);
@ -624,7 +624,7 @@ static void InternetCrackUrl_test(void)
/* Invalid Call: size of dwStructSize must be one of the "standard" sizes /* Invalid Call: size of dwStructSize must be one of the "standard" sizes
* of the URL_COMPONENTS structure (Windows only enforces this on the * of the URL_COMPONENTS structure (Windows only enforces this on the
* InternetCrackUrlA version of the call) */ * InternetCrackUrlA version of the call) */
copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 2048, 1024); copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
urlComponents.dwStructSize = sizeof(urlComponents) + 1; urlComponents.dwStructSize = sizeof(urlComponents) + 1;
ret = InternetCrackUrlA(TEST_URL, 0, 0, &urlComponents); ret = InternetCrackUrlA(TEST_URL, 0, 0, &urlComponents);