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
b5c89b6d
Commit
b5c89b6d
authored
Jul 12, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jul 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added some more test URIs.
parent
c0ee555e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
7 deletions
+73
-7
uri.c
dlls/urlmon/tests/uri.c
+73
-7
No files found.
dlls/urlmon/tests/uri.c
View file @
b5c89b6d
...
...
@@ -65,6 +65,7 @@ typedef struct _uri_str_property {
const
char
*
value
;
HRESULT
expected
;
BOOL
todo
;
const
char
*
broken_value
;
}
uri_str_property
;
typedef
struct
_uri_dword_property
{
...
...
@@ -1867,6 +1868,64 @@ static const uri_properties uri_tests[] = {
{
URL_SCHEME_UNKNOWN
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Port is just copied over. */
{
"http://google.com:00035"
,
Uri_CREATE_NO_CANONICALIZE
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"http://google.com:00035"
,
S_OK
,
TRUE
},
{
"google.com:00035"
,
S_OK
,
TRUE
},
{
"http://google.com:00035"
,
S_OK
,
TRUE
,
"http://google.com:35"
},
{
"google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"google.com"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"http://google.com:00035"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
35
,
S_OK
,
FALSE
},
{
URL_SCHEME_HTTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Default port is copied over. */
{
"http://google.com:80"
,
Uri_CREATE_NO_CANONICALIZE
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"http://google.com:80"
,
S_OK
,
TRUE
},
{
"google.com:80"
,
S_OK
,
TRUE
},
{
"http://google.com:80"
,
S_OK
,
TRUE
},
{
"google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"google.com"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"http://google.com:80"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
80
,
S_OK
,
FALSE
},
{
URL_SCHEME_HTTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
}
};
...
...
@@ -2108,7 +2167,8 @@ static void test_IUri_GetPropertyBSTR(void) {
hr
,
prop
.
expected
,
i
,
j
);
}
todo_wine
{
ok
(
!
strcmp_aw
(
prop
.
value
,
received
),
"Expected %s but got %s on uri_tests[%d].str_props[%d].
\n
"
,
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Expected %s but got %s on uri_tests[%d].str_props[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
if
(
hr
==
E_NOTIMPL
)
/* no point in continuing */
...
...
@@ -2120,7 +2180,8 @@ static void test_IUri_GetPropertyBSTR(void) {
}
else
{
ok
(
hr
==
prop
.
expected
,
"GetPropertyBSTR returned 0x%08x, expected 0x%08x. On uri_tests[%d].str_props[%d].
\n
"
,
hr
,
prop
.
expected
,
i
,
j
);
ok
(
!
strcmp_aw
(
prop
.
value
,
received
),
"Expected %s but got %s on uri_tests[%d].str_props[%d].
\n
"
,
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Expected %s but got %s on uri_tests[%d].str_props[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
...
...
@@ -2339,13 +2400,15 @@ static void test_IUri_GetStrProperties(void) {
hr
,
prop
.
expected
,
i
);
}
todo_wine
{
ok
(
!
strcmp_aw
(
prop
.
value
,
received
),
"Error: Expected %s but got %s on uri_test[%d].
\n
"
,
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected %s but got %s on uri_test[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
);
}
}
else
{
ok
(
hr
==
prop
.
expected
,
"Error: GetDisplayUri returned 0x%08x, expected 0x%08x on uri_tests[%d].
\n
"
,
hr
,
prop
.
expected
,
i
);
ok
(
!
strcmp_aw
(
prop
.
value
,
received
),
"Error: Expected %s but got %s on uri_tests[%d].
\n
"
,
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected %s but got %s on uri_tests[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
);
}
SysFreeString
(
received
);
...
...
@@ -2780,10 +2843,11 @@ static void test_IUri_GetPropertyLength(void) {
DWORD
j
;
for
(
j
=
Uri_PROPERTY_STRING_START
;
j
<=
Uri_PROPERTY_STRING_LAST
;
++
j
)
{
DWORD
expectedLen
,
receivedLen
;
DWORD
expectedLen
,
brokenLen
,
receivedLen
;
uri_str_property
prop
=
test
.
str_props
[
j
];
expectedLen
=
lstrlen
(
prop
.
value
);
brokenLen
=
lstrlen
(
prop
.
broken_value
);
/* This won't be necessary once GetPropertyLength is implemented. */
receivedLen
=
-
1
;
...
...
@@ -2795,7 +2859,8 @@ static void test_IUri_GetPropertyLength(void) {
hr
,
prop
.
expected
,
i
,
j
);
}
todo_wine
{
ok
(
receivedLen
==
expectedLen
,
"Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].
\n
"
,
ok
(
receivedLen
==
expectedLen
||
broken
(
receivedLen
==
brokenLen
),
"Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].
\n
"
,
expectedLen
,
receivedLen
,
i
,
j
);
}
if
(
hr
==
E_NOTIMPL
)
/* no point in continuing */
...
...
@@ -2807,7 +2872,8 @@ static void test_IUri_GetPropertyLength(void) {
}
else
{
ok
(
hr
==
prop
.
expected
,
"Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].
\n
"
,
hr
,
prop
.
expected
,
i
,
j
);
ok
(
receivedLen
==
expectedLen
,
"Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].
\n
"
,
ok
(
receivedLen
==
expectedLen
||
broken
(
receivedLen
==
brokenLen
),
"Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].
\n
"
,
expectedLen
,
receivedLen
,
i
,
j
);
}
}
...
...
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