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
bef85fbc
Commit
bef85fbc
authored
Sep 08, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Sep 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented IUriBuilder_RemoveProperties.
parent
9d41c3d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
15 deletions
+72
-15
uri.c
dlls/urlmon/tests/uri.c
+38
-13
uri.c
dlls/urlmon/uri.c
+34
-2
No files found.
dlls/urlmon/tests/uri.c
View file @
bef85fbc
...
...
@@ -4943,16 +4943,38 @@ typedef struct _uri_builder_remove_test {
static
const
uri_builder_remove_test
uri_builder_remove_tests
[]
=
{
{
"http://google.com/test?test=y#Frag"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_FRAGMENT
|
Uri_HAS_PATH
|
Uri_HAS_QUERY
,
S_OK
,
TRU
E
,
Uri_HAS_FRAGMENT
|
Uri_HAS_PATH
|
Uri_HAS_QUERY
,
S_OK
,
FALS
E
,
"http://google.com/"
,
0
,
S_OK
,
TRUE
},
{
"http://user:pass@winehq.org/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_USER_NAME
|
Uri_HAS_PASSWORD
,
S_OK
,
TRU
E
,
Uri_HAS_USER_NAME
|
Uri_HAS_PASSWORD
,
S_OK
,
FALS
E
,
"http://winehq.org/"
,
0
,
S_OK
,
TRUE
},
{
"zip://google.com?Test=x"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_HOST
,
S_OK
,
TRU
E
,
Uri_HAS_HOST
,
S_OK
,
FALS
E
,
"zip:/?Test=x"
,
0
,
S_OK
,
TRUE
},
/* Doesn't remove the whole userinfo component. */
{
"http://username:pass@google.com/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_USER_INFO
,
S_OK
,
FALSE
,
"http://username:pass@google.com/"
,
0
,
S_OK
,
TRUE
},
/* Doesn't remove the domain. */
{
"http://google.com/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_DOMAIN
,
S_OK
,
FALSE
,
"http://google.com/"
,
0
,
S_OK
,
TRUE
},
{
"http://google.com:120/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_AUTHORITY
,
S_OK
,
FALSE
,
"http://google.com:120/"
,
0
,
S_OK
,
TRUE
},
{
"http://google.com/test.com/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_EXTENSION
,
S_OK
,
FALSE
,
"http://google.com/test.com/"
,
0
,
S_OK
,
TRUE
},
{
"http://google.com/?test=x"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_PATH_AND_QUERY
,
S_OK
,
FALSE
,
"http://google.com/?test=x"
,
0
,
S_OK
,
TRUE
}
};
...
...
@@ -7837,19 +7859,22 @@ static void test_IUriBuilder_RemoveProperties(void) {
for
(
i
=
Uri_PROPERTY_STRING_START
;
i
<=
Uri_PROPERTY_DWORD_LAST
;
++
i
)
{
hr
=
IUriBuilder_RemoveProperties
(
builder
,
i
<<
1
);
if
((
i
<<
1
)
&
invalid
)
{
todo_wine
{
ok
(
hr
==
E_INVALIDARG
,
"Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.
\n
"
,
hr
,
E_INVALIDARG
,
i
);
}
ok
(
hr
==
E_INVALIDARG
,
"Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.
\n
"
,
hr
,
E_INVALIDARG
,
i
);
}
else
{
todo_wine
{
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.
\n
"
,
hr
,
S_OK
,
i
);
}
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.
\n
"
,
hr
,
S_OK
,
i
);
}
}
/* Also doesn't accept anything that's outside the range of the
* Uri_HAS flags.
*/
hr
=
IUriBuilder_RemoveProperties
(
builder
,
(
Uri_PROPERTY_DWORD_LAST
+
1
)
<<
1
);
ok
(
hr
==
E_INVALIDARG
,
"Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_INVALIDARG
);
}
if
(
builder
)
IUriBuilder_Release
(
builder
);
...
...
dlls/urlmon/uri.c
View file @
bef85fbc
...
...
@@ -4743,9 +4743,41 @@ static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewV
static
HRESULT
WINAPI
UriBuilder_RemoveProperties
(
IUriBuilder
*
iface
,
DWORD
dwPropertyMask
)
{
const
DWORD
accepted_flags
=
Uri_HAS_AUTHORITY
|
Uri_HAS_DOMAIN
|
Uri_HAS_EXTENSION
|
Uri_HAS_FRAGMENT
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_QUERY
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
;
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
FIXME
(
"(%p)->(0x%08x)
\n
"
,
This
,
dwPropertyMask
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(0x%08x)
\n
"
,
This
,
dwPropertyMask
);
if
(
dwPropertyMask
&
~
accepted_flags
)
return
E_INVALIDARG
;
if
(
dwPropertyMask
&
Uri_HAS_FRAGMENT
)
UriBuilder_SetFragment
(
iface
,
NULL
);
if
(
dwPropertyMask
&
Uri_HAS_HOST
)
UriBuilder_SetHost
(
iface
,
NULL
);
if
(
dwPropertyMask
&
Uri_HAS_PASSWORD
)
UriBuilder_SetPassword
(
iface
,
NULL
);
if
(
dwPropertyMask
&
Uri_HAS_PATH
)
UriBuilder_SetPath
(
iface
,
NULL
);
if
(
dwPropertyMask
&
Uri_HAS_PORT
)
UriBuilder_SetPort
(
iface
,
FALSE
,
0
);
if
(
dwPropertyMask
&
Uri_HAS_QUERY
)
UriBuilder_SetQuery
(
iface
,
NULL
);
if
(
dwPropertyMask
&
Uri_HAS_SCHEME_NAME
)
UriBuilder_SetSchemeName
(
iface
,
NULL
);
if
(
dwPropertyMask
&
Uri_HAS_USER_NAME
)
UriBuilder_SetUserName
(
iface
,
NULL
);
return
S_OK
;
}
static
HRESULT
WINAPI
UriBuilder_HasBeenModified
(
IUriBuilder
*
iface
,
BOOL
*
pfModified
)
...
...
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