Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bc32d481
Commit
bc32d481
authored
Feb 24, 2011
by
Austin English
Committed by
Alexandre Julliard
Feb 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Remove win9x hacks.
parent
04b57639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
26 deletions
+12
-26
protocol.c
dlls/urlmon/tests/protocol.c
+12
-26
No files found.
dlls/urlmon/tests/protocol.c
View file @
bc32d481
...
...
@@ -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
),
/* Win
9x, Win
ME 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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment