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
d56e62a1
Commit
d56e62a1
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/tests: IUriBuilder's can create IUri's even if they don't have a base IUri.
parent
dd0ea1cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
37 deletions
+37
-37
uri.c
dlls/urlmon/tests/uri.c
+34
-17
uri.c
dlls/urlmon/uri.c
+3
-20
No files found.
dlls/urlmon/tests/uri.c
View file @
d56e62a1
...
...
@@ -4888,6 +4888,40 @@ static const uri_builder_test uri_builder_tests[] = {
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
/* IUriBuilder doesn't need a base IUri to build a IUri. */
{
NULL
,
0
,
S_OK
,
FALSE
,
{
{
TRUE
,
"http"
,
NULL
,
Uri_PROPERTY_SCHEME_NAME
,
S_OK
,
FALSE
},
{
TRUE
,
"google.com"
,
NULL
,
Uri_PROPERTY_HOST
,
S_OK
,
FALSE
}
},
{
FALSE
},
0
,
S_OK
,
TRUE
,
0
,
S_OK
,
TRUE
,
0
,
0
,
0
,
S_OK
,
TRUE
,
{
{
"http://google.com/"
,
S_OK
},
{
"google.com"
,
S_OK
},
{
"http://google.com/"
,
S_OK
},
{
"google.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"google.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"/"
,
S_OK
},
{
"/"
,
S_OK
},
{
""
,
S_FALSE
},
{
"http://google.com/"
,
S_OK
},
{
"http"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
},
{
80
,
S_OK
},
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
};
...
...
@@ -6500,10 +6534,6 @@ static void test_IUriBuilder_CreateInvalidArgs(void) {
IUri
*
test
=
NULL
,
*
uri
=
(
void
*
)
0xdeadbeef
;
/* Test what happens if the IUriBuilder doesn't have a IUri set. */
hr
=
IUriBuilder_CreateUri
(
builder
,
0
,
0
,
0
,
&
uri
);
ok
(
hr
==
INET_E_INVALID_URL
,
"Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
INET_E_INVALID_URL
);
ok
(
uri
==
NULL
,
"Error: Expected uri to be NULL, but was %p instead.
\n
"
,
uri
);
hr
=
IUriBuilder_CreateUri
(
builder
,
0
,
0
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
...
...
@@ -6512,12 +6542,6 @@ static void test_IUriBuilder_CreateInvalidArgs(void) {
ok
(
hr
==
E_NOTIMPL
,
"Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_NOTIMPL
);
ok
(
uri
==
NULL
,
"Error: expected uri to be NULL, but was %p instead.
\n
"
,
uri
);
uri
=
(
void
*
)
0xdeadbeef
;
hr
=
IUriBuilder_CreateUriSimple
(
builder
,
0
,
0
,
&
uri
);
ok
(
hr
==
INET_E_INVALID_URL
,
"Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
INET_E_INVALID_URL
);
ok
(
!
uri
,
"Error: Expected uri to be NULL, but was %p instead.
\n
"
,
uri
);
hr
=
IUriBuilder_CreateUriSimple
(
builder
,
0
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
...
...
@@ -6528,13 +6552,6 @@ static void test_IUriBuilder_CreateInvalidArgs(void) {
hr
,
E_NOTIMPL
);
ok
(
!
uri
,
"Error: Expected uri to NULL, but was %p instead.
\n
"
,
uri
);
uri
=
(
void
*
)
0xdeadbeef
;
hr
=
IUriBuilder_CreateUriWithFlags
(
builder
,
0
,
0
,
0
,
0
,
&
uri
);
ok
(
hr
==
INET_E_INVALID_URL
,
"Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
INET_E_INVALID_URL
);
ok
(
!
uri
,
"Error: Expected uri to be NULL, but was %p instead.
\n
"
,
uri
);
hr
=
IUriBuilder_CreateUriWithFlags
(
builder
,
0
,
0
,
0
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
...
...
dlls/urlmon/uri.c
View file @
d56e62a1
...
...
@@ -4404,16 +4404,11 @@ static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface,
return
E_POINTER
;
/* Acts the same way as CreateUri. */
if
(
dwAllowEncodingPropertyMask
&&
!
This
->
uri
)
{
if
(
dwAllowEncodingPropertyMask
&&
(
!
This
->
uri
||
This
->
modified_props
)
)
{
*
ppIUri
=
NULL
;
return
E_NOTIMPL
;
}
if
(
!
This
->
uri
)
{
*
ppIUri
=
NULL
;
return
INET_E_INVALID_URL
;
}
FIXME
(
"(%p)->(%d %d %p)
\n
"
,
This
,
dwAllowEncodingPropertyMask
,
(
DWORD
)
dwReserved
,
ppIUri
);
return
E_NOTIMPL
;
}
...
...
@@ -4433,19 +4428,12 @@ static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface,
/* The only time it doesn't return E_NOTIMPL when the dwAllow parameter
* has flags set, is when the IUriBuilder has a IUri set and it hasn't
* been modified (a call to a "Set*" hasn't been performed).
*
* TODO: Check if the IUriBuilder's properties have been modified.
*/
if
(
dwAllowEncodingPropertyMask
&&
!
This
->
uri
)
{
if
(
dwAllowEncodingPropertyMask
&&
(
!
This
->
uri
||
This
->
modified_props
)
)
{
*
ppIUri
=
NULL
;
return
E_NOTIMPL
;
}
if
(
!
This
->
uri
)
{
*
ppIUri
=
NULL
;
return
INET_E_INVALID_URL
;
}
FIXME
(
"(%p)->(0x%08x %d %d %p)
\n
"
,
This
,
dwCreateFlags
,
dwAllowEncodingPropertyMask
,
(
DWORD
)
dwReserved
,
ppIUri
);
return
E_NOTIMPL
;
}
...
...
@@ -4465,16 +4453,11 @@ static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface,
return
E_POINTER
;
/* Same as CreateUri. */
if
(
dwAllowEncodingPropertyMask
&&
!
This
->
uri
)
{
if
(
dwAllowEncodingPropertyMask
&&
(
!
This
->
uri
||
This
->
modified_props
)
)
{
*
ppIUri
=
NULL
;
return
E_NOTIMPL
;
}
if
(
!
This
->
uri
)
{
*
ppIUri
=
NULL
;
return
INET_E_INVALID_URL
;
}
FIXME
(
"(%p)->(0x%08x 0x%08x %d %d %p)
\n
"
,
This
,
dwCreateFlags
,
dwUriBuilderFlags
,
dwAllowEncodingPropertyMask
,
(
DWORD
)
dwReserved
,
ppIUri
);
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