shdocvw/tests: Fix a test on IE 5.x.
This commit is contained in:
parent
7130f9770b
commit
1a0f1f5db8
|
@ -112,12 +112,16 @@ static void test_URLSubRegQueryA(void)
|
||||||
ok((hr == S_OK) && !used,
|
ok((hr == S_OK) && !used,
|
||||||
"got 0x%x and %d (expected S_OK and 0)\n", hr, used);
|
"got 0x%x and %d (expected S_OK and 0)\n", hr, used);
|
||||||
|
|
||||||
/* size of buffer is 0, but the function still succeed */
|
/* size of buffer is 0, but the function still succeed.
|
||||||
|
buffer[0] is cleared in IE 5.01 and IE 5.5 (Buffer Overflow) */
|
||||||
memset(buffer, '#', sizeof(buffer)-1);
|
memset(buffer, '#', sizeof(buffer)-1);
|
||||||
buffer[sizeof(buffer)-1] = '\0';
|
buffer[sizeof(buffer)-1] = '\0';
|
||||||
hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, 0, -1);
|
hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, 0, -1);
|
||||||
used = lstrlenA(buffer);
|
used = lstrlenA(buffer);
|
||||||
ok((hr == S_OK) && (used == INTERNET_MAX_URL_LENGTH - 1), "got 0x%x and %d\n", hr, used);
|
ok( (hr == S_OK) &&
|
||||||
|
((used == INTERNET_MAX_URL_LENGTH - 1) || broken(used == 0)) ,
|
||||||
|
"got 0x%x and %d (expected S_OK and INTERNET_MAX_URL_LENGTH - 1)\n",
|
||||||
|
hr, used);
|
||||||
|
|
||||||
/* still succeed without a buffer for the result */
|
/* still succeed without a buffer for the result */
|
||||||
hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, 0, -1);
|
hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, 0, -1);
|
||||||
|
|
Loading…
Reference in New Issue