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
6d887f07
Commit
6d887f07
authored
Feb 23, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Register MIME filter only for bindings testing them.
parent
288718d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
protocol.c
dlls/urlmon/tests/protocol.c
+23
-18
No files found.
dlls/urlmon/tests/protocol.c
View file @
6d887f07
...
...
@@ -2210,6 +2210,27 @@ static IClassFactory mimefilter_cf = { &MimeFilterCFVtbl };
#define TEST_USEIURI 0x0400
#define TEST_IMPLPROTEX 0x0800
static
void
register_filter
(
BOOL
do_register
)
{
IInternetSession
*
session
;
HRESULT
hres
;
static
const
WCHAR
gzipW
[]
=
{
'g'
,
'z'
,
'i'
,
'p'
,
0
};
hres
=
pCoInternetGetSession
(
0
,
&
session
,
0
);
ok
(
hres
==
S_OK
,
"CoInternetGetSession failed: %08x
\n
"
,
hres
);
if
(
do_register
)
{
hres
=
IInternetSession_RegisterMimeFilter
(
session
,
&
mimefilter_cf
,
&
IID_IInternetProtocol
,
gzipW
);
ok
(
hres
==
S_OK
,
"RegisterMimeFilter failed: %08x
\n
"
,
hres
);
}
else
{
hres
=
IInternetSession_UnregisterMimeFilter
(
session
,
&
mimefilter_cf
,
gzipW
);
ok
(
hres
==
S_OK
,
"RegisterMimeFilter failed: %08x
\n
"
,
hres
);
}
IInternetSession_Release
(
session
);
}
static
void
init_test
(
int
prot
,
DWORD
flags
)
{
tested_protocol
=
prot
;
...
...
@@ -2239,6 +2260,8 @@ static void init_test(int prot, DWORD flags)
test_redirect
=
(
flags
&
TEST_REDIRECT
)
!=
0
;
test_abort
=
(
flags
&
TEST_ABORT
)
!=
0
;
impl_protex
=
(
flags
&
TEST_IMPLPROTEX
)
!=
0
;
register_filter
(
mimefilter_test
);
}
static
void
test_priority
(
IInternetProtocol
*
protocol
)
...
...
@@ -3463,22 +3486,6 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags)
IInternetSession_Release
(
session
);
}
static
void
register_filter
(
void
)
{
IInternetSession
*
session
;
HRESULT
hres
;
static
const
WCHAR
gzipW
[]
=
{
'g'
,
'z'
,
'i'
,
'p'
,
0
};
hres
=
pCoInternetGetSession
(
0
,
&
session
,
0
);
ok
(
hres
==
S_OK
,
"CoInternetGetSession failed: %08x
\n
"
,
hres
);
hres
=
IInternetSession_RegisterMimeFilter
(
session
,
&
mimefilter_cf
,
&
IID_IInternetProtocol
,
gzipW
);
ok
(
hres
==
S_OK
,
"RegisterMimeFilter failed: %08x
\n
"
,
hres
);
IInternetSession_Release
(
session
);
}
START_TEST
(
protocol
)
{
HMODULE
hurlmon
;
...
...
@@ -3504,8 +3511,6 @@ START_TEST(protocol)
event_continue_done
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
thread_id
=
GetCurrentThreadId
();
register_filter
();
test_file_protocol
();
test_http_protocol
();
test_https_protocol
();
...
...
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