urlmon/tests: Remove win9x hacks.
This commit is contained in:
parent
04b5763923
commit
bc32d4819a
|
@ -215,15 +215,6 @@ static int strcmp_wa(LPCWSTR strw, const char *stra)
|
|||
return lstrcmpA(stra, buf);
|
||||
}
|
||||
|
||||
/* lstrcmpW is not implemented on Win9x */
|
||||
static int strcmp_ww(LPCWSTR strw1, LPCWSTR strw2)
|
||||
{
|
||||
CHAR stra1[512], stra2[512];
|
||||
WideCharToMultiByte(CP_ACP, 0, strw1, -1, stra1, MAX_PATH, NULL, NULL);
|
||||
WideCharToMultiByte(CP_ACP, 0, strw2, -1, stra2, MAX_PATH, NULL, NULL);
|
||||
return lstrcmpA(stra1, stra2);
|
||||
}
|
||||
|
||||
static BOOL proxy_active(void)
|
||||
{
|
||||
HKEY internet_settings;
|
||||
|
@ -333,9 +324,9 @@ static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface,
|
|||
CHECK_EXPECT(BeginningTransaction);
|
||||
|
||||
if(binding_test)
|
||||
ok(!strcmp_ww(szURL, binding_urls[tested_protocol]), "szURL != http_url\n");
|
||||
ok(!lstrcmpW(szURL, binding_urls[tested_protocol]), "szURL != http_url\n");
|
||||
else
|
||||
ok(!strcmp_ww(szURL, http_url), "szURL != http_url\n");
|
||||
ok(!lstrcmpW(szURL, http_url), "szURL != http_url\n");
|
||||
ok(!dwReserved, "dwReserved=%d, expected 0\n", dwReserved);
|
||||
ok(pszAdditionalHeaders != NULL, "pszAdditionalHeaders == NULL\n");
|
||||
if(pszAdditionalHeaders)
|
||||
|
@ -765,9 +756,9 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
|
|||
ok(szStatusText != NULL, "szStatusText == NULL\n");
|
||||
if(szStatusText) {
|
||||
if(binding_test)
|
||||
ok(!strcmp_ww(szStatusText, expect_wsz), "unexpected szStatusText\n");
|
||||
ok(!lstrcmpW(szStatusText, expect_wsz), "unexpected szStatusText\n");
|
||||
else if(tested_protocol == FILE_TEST)
|
||||
ok(!strcmp_ww(szStatusText, file_name), "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
|
||||
ok(!lstrcmpW(szStatusText, file_name), "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
|
||||
else
|
||||
ok(szStatusText != NULL, "szStatusText == NULL\n");
|
||||
}
|
||||
|
@ -792,12 +783,12 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
|
|||
CHECK_EXPECT(ReportProgress_VERIFIEDMIMETYPEAVAILABLE);
|
||||
ok(szStatusText != NULL, "szStatusText == NULL\n");
|
||||
if(szStatusText)
|
||||
ok(!strcmp_ww(szStatusText, text_htmlW), "szStatusText != text/html\n");
|
||||
ok(!lstrcmpW(szStatusText, text_htmlW), "szStatusText != text/html\n");
|
||||
break;
|
||||
case BINDSTATUS_PROTOCOLCLASSID:
|
||||
CHECK_EXPECT(ReportProgress_PROTOCOLCLASSID);
|
||||
ok(szStatusText != NULL, "szStatusText == NULL\n");
|
||||
ok(!strcmp_ww(szStatusText, null_guid), "unexpected classid %s\n", wine_dbgstr_w(szStatusText));
|
||||
ok(!lstrcmpW(szStatusText, null_guid), "unexpected classid %s\n", wine_dbgstr_w(szStatusText));
|
||||
break;
|
||||
case BINDSTATUS_COOKIE_SENT:
|
||||
CHECK_EXPECT(ReportProgress_COOKIE_SENT);
|
||||
|
@ -829,7 +820,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
|
|||
break;
|
||||
case BINDSTATUS_DECODING:
|
||||
CHECK_EXPECT(ReportProgress_DECODING);
|
||||
ok(!strcmp_ww(szStatusText, gzipW), "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
|
||||
ok(!lstrcmpW(szStatusText, gzipW), "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
|
||||
break;
|
||||
default:
|
||||
ok(0, "Unexpected status %d\n", ulStatusCode);
|
||||
|
@ -1013,7 +1004,7 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
|
|||
ok(dwError == ERROR_SUCCESS, "dwError = %d, expected ERROR_SUCCESS\n", dwError);
|
||||
else
|
||||
ok(dwError != ERROR_SUCCESS ||
|
||||
broken(tested_protocol == MK_TEST), /* Win9x, WinME and NT4 */
|
||||
broken(tested_protocol == MK_TEST), /* WinME and NT4 */
|
||||
"dwError == ERROR_SUCCESS\n");
|
||||
ok(!szResult, "szResult != NULL\n");
|
||||
|
||||
|
@ -1557,7 +1548,7 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo
|
|||
ok(hres == S_OK, "GetBindString(BINDSTRING_USER_AGETNT) failed: %08x\n", hres);
|
||||
ok(fetched == 1, "fetched = %d, expected 254\n", fetched);
|
||||
ok(ua != NULL, "ua = %p\n", ua);
|
||||
ok(!strcmp_ww(ua, user_agentW), "unexpected user agent %s\n", wine_dbgstr_w(ua));
|
||||
ok(!lstrcmpW(ua, user_agentW), "unexpected user agent %s\n", wine_dbgstr_w(ua));
|
||||
CoTaskMemFree(ua);
|
||||
|
||||
fetched = 256;
|
||||
|
@ -1569,7 +1560,7 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo
|
|||
ok(hres == S_OK,
|
||||
"GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres);
|
||||
ok(fetched == 1, "fetched = %d, expected 1\n", fetched);
|
||||
ok(!strcmp_ww(acc_mimeW, accept_mimes[0]), "unexpected mimes %s\n", wine_dbgstr_w(accept_mimes[0]));
|
||||
ok(!lstrcmpW(acc_mimeW, accept_mimes[0]), "unexpected mimes %s\n", wine_dbgstr_w(accept_mimes[0]));
|
||||
CoTaskMemFree(accept_mimes[0]);
|
||||
|
||||
hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider,
|
||||
|
@ -1960,7 +1951,7 @@ static HRESULT WINAPI MimeProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU
|
|||
|
||||
CHECK_EXPECT(MimeFilter_Start);
|
||||
|
||||
ok(!strcmp_ww(szUrl, gzipW), "wrong url %s\n", wine_dbgstr_w(szUrl));
|
||||
ok(!lstrcmpW(szUrl, gzipW), "wrong url %s\n", wine_dbgstr_w(szUrl));
|
||||
ok(grfPI == (PI_FILTER_MODE|PI_FORCE_ASYNC), "grfPI=%x, expected PI_FILTER_MODE|PI_FORCE_ASYNC\n", grfPI);
|
||||
ok(dwReserved, "dwReserved == 0\n");
|
||||
ok(pOIProtSink != NULL, "pOIProtSink == NULL\n");
|
||||
|
@ -2020,7 +2011,7 @@ static HRESULT WINAPI MimeProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU
|
|||
hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_URL, &url_str, 1, &fetched);
|
||||
ok(hres == S_OK, "GetBindString(BINDSTRING_URL) failed: %08x\n", hres);
|
||||
ok(fetched == 1, "fetched = %d\n", fetched);
|
||||
ok(!strcmp_ww(url_str, binding_urls[tested_protocol]), "wrong url_str %s\n", wine_dbgstr_w(url_str));
|
||||
ok(!lstrcmpW(url_str, binding_urls[tested_protocol]), "wrong url_str %s\n", wine_dbgstr_w(url_str));
|
||||
CoTaskMemFree(url_str);
|
||||
CHECK_CALLED(GetBindString_URL);
|
||||
|
||||
|
@ -2570,11 +2561,6 @@ static void test_file_protocol(void) {
|
|||
SetLastError(0xdeadbeef);
|
||||
file = CreateFileW(wszIndexHtml, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(!file && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||
{
|
||||
win_skip("Detected Win9x or WinMe\n");
|
||||
return;
|
||||
}
|
||||
ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
|
||||
if(file == INVALID_HANDLE_VALUE)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue