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
bced2e21
Commit
bced2e21
authored
Oct 09, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Nov 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented base case for CoInternetCombineIUri.
parent
2d61633e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
158 additions
and
5 deletions
+158
-5
uri.c
dlls/urlmon/tests/uri.c
+94
-3
uri.c
dlls/urlmon/uri.c
+64
-2
No files found.
dlls/urlmon/tests/uri.c
View file @
bced2e21
...
...
@@ -5578,7 +5578,7 @@ static const uri_combine_test uri_combine_tests[] = {
},
{
"http://google.com/test"
,
0
,
"zip://test.com/cool"
,
0
,
0
,
S_OK
,
TRU
E
,
0
,
S_OK
,
FALS
E
,
{
{
"zip://test.com/cool"
,
S_OK
},
{
"test.com"
,
S_OK
},
...
...
@@ -5899,6 +5899,95 @@ static const uri_combine_test uri_combine_tests[] = {
{
URL_SCHEME_FILE
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
/* URL_DONT_SIMPLIFY has no effect. */
{
"http://google.com/test"
,
0
,
"zip://test.com/cool/../cool/test"
,
0
,
URL_DONT_SIMPLIFY
,
S_OK
,
FALSE
,
{
{
"zip://test.com/cool/test"
,
S_OK
},
{
"test.com"
,
S_OK
},
{
"zip://test.com/cool/test"
,
S_OK
},
{
"test.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"test.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"/cool/test"
,
S_OK
},
{
"/cool/test"
,
S_OK
},
{
""
,
S_FALSE
},
/* The resulting IUri has the same Raw URI as the relative URI (only IE 8).
* On IE 7 it reduces the path in the Raw URI.
*/
{
"zip://test.com/cool/../cool/test"
,
S_OK
,
FALSE
,
"zip://test.com/cool/test"
},
{
"zip"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
},
{
0
,
S_FALSE
},
{
URL_SCHEME_UNKNOWN
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
/* FILE_USE_PATHURL has no effect in IE 8, in IE 7 the
* resulting URI is converted into a dos path.
*/
{
"http://google.com/test"
,
0
,
"file:///c:/test/"
,
0
,
URL_FILE_USE_PATHURL
,
S_OK
,
FALSE
,
{
{
"file:///c:/test/"
,
S_OK
,
FALSE
,
"file://c:
\\
test
\\
"
},
{
""
,
S_FALSE
},
{
"file:///c:/test/"
,
S_OK
,
FALSE
,
"file://c:
\\
test
\\
"
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"/c:/test/"
,
S_OK
,
FALSE
,
"c:
\\
test
\\
"
},
{
"/c:/test/"
,
S_OK
,
FALSE
,
"c:
\\
test
\\
"
},
{
""
,
S_FALSE
},
{
"file:///c:/test/"
,
S_OK
,
FALSE
,
"file://c:
\\
test
\\
"
},
{
"file"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
},
{
0
,
S_FALSE
},
{
URL_SCHEME_FILE
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
{
"http://google.com/test"
,
0
,
"http://test.com/test#%30test"
,
0
,
URL_DONT_UNESCAPE_EXTRA_INFO
,
S_OK
,
FALSE
,
{
{
"http://test.com/test#0test"
,
S_OK
},
{
"test.com"
,
S_OK
},
{
"http://test.com/test#0test"
,
S_OK
},
{
"test.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"#0test"
,
S_OK
},
{
"test.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"/test"
,
S_OK
},
{
"/test"
,
S_OK
},
{
""
,
S_FALSE
},
/* IE 7 decodes the %30 to a 0 in the Raw URI. */
{
"http://test.com/test#%30test"
,
S_OK
,
FALSE
,
"http://test.com/test#0test"
},
{
"http"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
},
{
80
,
S_OK
},
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
};
...
...
@@ -9072,7 +9161,8 @@ static void test_CoInternetCombineIUri(void) {
hr
,
prop
.
expected
,
i
,
j
);
}
todo_wine
{
ok
(
!
strcmp_aw
(
prop
.
value
,
received
),
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected %s but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
...
...
@@ -9080,7 +9170,8 @@ static void test_CoInternetCombineIUri(void) {
ok
(
hr
==
prop
.
expected
,
"Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].
\n
"
,
hr
,
prop
.
expected
,
i
,
j
);
ok
(
!
strcmp_aw
(
prop
.
value
,
received
),
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected %s but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
...
...
dlls/urlmon/uri.c
View file @
bced2e21
...
...
@@ -5589,12 +5589,63 @@ HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserve
return
S_OK
;
}
static
HRESULT
combine_uri
(
Uri
*
base
,
Uri
*
relative
,
DWORD
flags
,
IUri
**
result
)
{
Uri
*
ret
;
HRESULT
hr
;
parse_data
data
;
/* Base case is when the relative Uri has a scheme name,
* if it does, then 'result' will contain the same data
* as the relative Uri.
*/
if
(
relative
->
scheme_start
>
-
1
)
{
DWORD
create_flags
=
0
;
memset
(
&
data
,
0
,
sizeof
(
parse_data
));
data
.
uri
=
SysAllocString
(
relative
->
raw_uri
);
if
(
!
data
.
uri
)
{
IUri_Release
(
URI
(
ret
));
*
result
=
NULL
;
return
E_OUTOFMEMORY
;
}
parse_uri
(
&
data
,
0
);
ret
=
create_uri_obj
();
if
(
!
ret
)
{
*
result
=
NULL
;
return
E_OUTOFMEMORY
;
}
ret
->
raw_uri
=
data
.
uri
;
hr
=
canonicalize_uri
(
&
data
,
ret
,
0
);
if
(
FAILED
(
hr
))
{
IUri_Release
(
URI
(
ret
));
*
result
=
NULL
;
return
hr
;
}
apply_default_flags
(
&
create_flags
);
ret
->
create_flags
=
create_flags
;
*
result
=
URI
(
ret
);
}
else
{
*
result
=
NULL
;
return
E_NOTIMPL
;
}
return
S_OK
;
}
/***********************************************************************
* CoInternetCombineIUri (urlmon.@)
*/
HRESULT
WINAPI
CoInternetCombineIUri
(
IUri
*
pBaseUri
,
IUri
*
pRelativeUri
,
DWORD
dwCombineFlags
,
IUri
**
ppCombinedUri
,
DWORD_PTR
dwReserved
)
{
HRESULT
hr
;
Uri
*
relative
,
*
base
;
TRACE
(
"(%p %p %x %p %x)
\n
"
,
pBaseUri
,
pRelativeUri
,
dwCombineFlags
,
ppCombinedUri
,
(
DWORD
)
dwReserved
);
if
(
!
ppCombinedUri
)
...
...
@@ -5605,6 +5656,17 @@ HRESULT WINAPI CoInternetCombineIUri(IUri *pBaseUri, IUri *pRelativeUri, DWORD d
return
E_INVALIDARG
;
}
FIXME
(
"(%p %p %x %p %x): stub
\n
"
,
pBaseUri
,
pRelativeUri
,
dwCombineFlags
,
ppCombinedUri
,
(
DWORD
)
dwReserved
);
return
E_NOTIMPL
;
relative
=
get_uri_obj
(
pRelativeUri
);
base
=
get_uri_obj
(
pBaseUri
);
if
(
!
relative
||
!
base
)
{
*
ppCombinedUri
=
NULL
;
FIXME
(
"(%p %p %x %p %x) Unknown IUri types not supported yet.
\n
"
,
pBaseUri
,
pRelativeUri
,
dwCombineFlags
,
ppCombinedUri
,
(
DWORD
)
dwReserved
);
return
E_NOTIMPL
;
}
hr
=
combine_uri
(
base
,
relative
,
dwCombineFlags
,
ppCombinedUri
);
if
(
hr
==
E_NOTIMPL
)
FIXME
(
"(%p %p %x %p %x): stub
\n
"
,
pBaseUri
,
pRelativeUri
,
dwCombineFlags
,
ppCombinedUri
,
(
DWORD
)
dwReserved
);
return
hr
;
}
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