Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c7459e83
Commit
c7459e83
authored
May 31, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jun 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added tests for IUri_HasProperty.
parent
b0739a34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
0 deletions
+79
-0
uri.c
dlls/urlmon/tests/uri.c
+75
-0
uri.c
dlls/urlmon/uri.c
+4
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
c7459e83
...
...
@@ -1284,6 +1284,78 @@ static void test_IUri_GetProperties(void) {
}
}
static
void
test_IUri_HasProperty
(
void
)
{
IUri
*
uri
=
NULL
;
HRESULT
hr
;
DWORD
i
;
hr
=
pCreateUri
(
http_urlW
,
0
,
0
,
&
uri
);
ok
(
hr
==
S_OK
,
"Error: CreateUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IUri_HasProperty
(
uri
,
Uri_PROPERTY_RAW_URI
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Error: HasProperty returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_INVALIDARG
);
}
if
(
uri
)
IUri_Release
(
uri
);
for
(
i
=
0
;
i
<
sizeof
(
uri_tests
)
/
sizeof
(
uri_tests
[
0
]);
++
i
)
{
uri_properties
test
=
uri_tests
[
i
];
LPWSTR
uriW
;
uri
=
NULL
;
uriW
=
a2w
(
test
.
uri
);
hr
=
pCreateUri
(
uriW
,
test
.
create_flags
,
0
,
&
uri
);
if
(
test
.
create_todo
)
{
todo_wine
{
ok
(
hr
==
test
.
create_expected
,
"Error: CreateUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
test
.
create_expected
);
}
}
else
{
ok
(
hr
==
test
.
create_expected
,
"Error: CreateUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
test
.
create_expected
);
}
if
(
SUCCEEDED
(
hr
))
{
DWORD
j
;
for
(
j
=
0
;
j
<=
Uri_PROPERTY_DWORD_LAST
;
++
j
)
{
/* Assign -1, then explicitly test for TRUE or FALSE later. */
BOOL
received
=
-
1
;
hr
=
IUri_HasProperty
(
uri
,
j
,
&
received
);
if
(
test
.
props_todo
)
{
todo_wine
{
ok
(
hr
==
S_OK
,
"Error: HasProperty returned 0x%08x, expected 0x%08x for property %d on uri_tests[%d].
\n
"
,
hr
,
S_OK
,
j
,
i
);
}
/* Check if the property should be true. */
if
(
test
.
props
&
(
1
<<
j
))
{
todo_wine
{
ok
(
received
==
TRUE
,
"Error: Expected to have property %d on uri_tests[%d].
\n
"
,
j
,
i
);
}
}
else
{
todo_wine
{
ok
(
received
==
FALSE
,
"Error: Wasn't expecting to have property %d on uri_tests[%d].
\n
"
,
j
,
i
);
}
}
}
else
{
ok
(
hr
==
S_OK
,
"Error: HasProperty returned 0x%08x, expected 0x%08x for property %d on uri_tests[%d].
\n
"
,
hr
,
S_OK
,
j
,
i
);
if
(
test
.
props
&
(
1
<<
j
))
{
ok
(
received
==
TRUE
,
"Error: Expected to have property %d on uri_tests[%d].
\n
"
,
j
,
i
);
}
else
{
ok
(
received
==
FALSE
,
"Error: Wasn't expecting to have property %d on uri_tests[%d].
\n
"
,
j
,
i
);
}
}
}
}
if
(
uri
)
IUri_Release
(
uri
);
heap_free
(
uriW
);
}
}
START_TEST
(
uri
)
{
HMODULE
hurlmon
;
...
...
@@ -1318,4 +1390,7 @@ START_TEST(uri) {
trace
(
"test IUri_GetProperties...
\n
"
);
test_IUri_GetProperties
();
trace
(
"test IUri_HasProperty...
\n
"
);
test_IUri_HasProperty
();
}
dlls/urlmon/uri.c
View file @
c7459e83
...
...
@@ -147,6 +147,10 @@ static HRESULT WINAPI Uri_HasProperty(IUri *iface, Uri_PROPERTY uriProp, BOOL *p
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%d %p)
\n
"
,
This
,
uriProp
,
pfHasProperty
);
if
(
!
pfHasProperty
)
return
E_INVALIDARG
;
return
E_NOTIMPL
;
}
...
...
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