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
47e93adc
Commit
47e93adc
authored
Aug 20, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Aug 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added tests for IUriBuilder_HasBeenModified.
parent
3745961b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
1 deletion
+78
-1
uri.c
dlls/urlmon/tests/uri.c
+73
-1
uri.c
dlls/urlmon/uri.c
+5
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
47e93adc
...
...
@@ -6297,16 +6297,20 @@ static void test_IUriBuilder(void) {
}
if
(
SUCCEEDED
(
hr
))
{
DWORD
j
;
BOOL
modified
=
FALSE
,
received
=
FALSE
;
/* Perform all the string property changes. */
for
(
j
=
0
;
j
<
URI_BUILDER_STR_PROPERTY_COUNT
;
++
j
)
{
uri_builder_property
prop
=
test
.
properties
[
j
];
if
(
prop
.
change
)
if
(
prop
.
change
)
{
modified
=
TRUE
;
change_property
(
builder
,
&
prop
,
i
);
}
}
if
(
test
.
port_prop
.
change
)
{
hr
=
IUriBuilder_SetPort
(
builder
,
test
.
port_prop
.
set
,
test
.
port_prop
.
value
);
modified
=
TRUE
;
if
(
test
.
port_prop
.
todo
)
{
todo_wine
{
ok
(
hr
==
test
.
port_prop
.
expected
,
...
...
@@ -6320,6 +6324,20 @@ static void test_IUriBuilder(void) {
}
}
hr
=
IUriBuilder_HasBeenModified
(
builder
,
&
received
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Error IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].
\n
"
,
hr
,
S_OK
,
i
);
}
if
(
SUCCEEDED
(
hr
))
{
todo_wine
{
ok
(
received
==
modified
,
"Error: Expected received to be %d but was %d instead on uri_builder_tests[%d].
\n
"
,
modified
,
received
,
i
);
}
}
/* Test the "Get*" functions. */
test_IUriBuilder_GetFragment
(
builder
,
&
test
,
i
);
test_IUriBuilder_GetHost
(
builder
,
&
test
,
i
);
...
...
@@ -6340,6 +6358,57 @@ static void test_IUriBuilder(void) {
}
}
static
void
test_IUriBuilder_HasBeenModified
(
void
)
{
HRESULT
hr
;
IUriBuilder
*
builder
=
NULL
;
hr
=
pCreateIUriBuilder
(
NULL
,
0
,
0
,
&
builder
);
ok
(
hr
==
S_OK
,
"Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
if
(
SUCCEEDED
(
hr
))
{
static
const
WCHAR
hostW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'c'
,
'o'
,
'm'
,
0
};
IUri
*
uri
=
NULL
;
BOOL
received
;
hr
=
IUriBuilder_HasBeenModified
(
builder
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
hr
=
IUriBuilder_SetHost
(
builder
,
hostW
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
}
hr
=
IUriBuilder_HasBeenModified
(
builder
,
&
received
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
}
if
(
SUCCEEDED
(
hr
))
todo_wine
{
ok
(
received
==
TRUE
,
"Error: Expected received to be TRUE.
\n
"
);
}
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
=
IUriBuilder_SetIUri
(
builder
,
uri
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
}
hr
=
IUriBuilder_HasBeenModified
(
builder
,
&
received
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
}
if
(
SUCCEEDED
(
hr
))
todo_wine
{
ok
(
received
==
FALSE
,
"Error: Expected received to be FALSE.
\n
"
);
}
}
if
(
uri
)
IUri_Release
(
uri
);
}
if
(
builder
)
IUriBuilder_Release
(
builder
);
}
START_TEST
(
uri
)
{
HMODULE
hurlmon
;
...
...
@@ -6406,4 +6475,7 @@ START_TEST(uri) {
trace
(
"test IUriBuilder_GetInvalidArgs...
\n
"
);
test_IUriBuilder_GetInvalidArgs
();
trace
(
"test IUriBuilder_HasBeenModified...
\n
"
);
test_IUriBuilder_HasBeenModified
();
}
dlls/urlmon/uri.c
View file @
47e93adc
...
...
@@ -4418,6 +4418,11 @@ static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD dwPr
static
HRESULT
WINAPI
UriBuilder_HasBeenModified
(
IUriBuilder
*
iface
,
BOOL
*
pfModified
)
{
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pfModified
);
if
(
!
pfModified
)
return
E_POINTER
;
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pfModified
);
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