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
261a39a0
Commit
261a39a0
authored
Sep 07, 2008
by
Reece Dunn
Committed by
Alexandre Julliard
Sep 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fixed the url tests on Vista.
parent
c722cca5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
url.c
dlls/shlwapi/tests/url.c
+8
-4
No files found.
dlls/shlwapi/tests/url.c
View file @
261a39a0
...
...
@@ -133,7 +133,6 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
{
"A"
,
0
,
S_OK
,
"A"
,
FALSE
},
{
"/uri-res/N2R?urn:sha1:B3K"
,
URL_DONT_ESCAPE_EXTRA_INFO
|
URL_WININET_COMPATIBILITY
/*0x82000000*/
,
S_OK
,
"/uri-res/N2R?urn:sha1:B3K"
,
TRUE
}
/*LimeWire online installer calls this*/
,
{
"http:www.winehq.org/dir/../index.html"
,
0
,
S_OK
,
"http:www.winehq.org/index.html"
},
{
""
,
0
,
S_OK
,
""
,
FALSE
}
};
/* ################ */
...
...
@@ -547,19 +546,23 @@ static void test_url_escape(const char *szUrl, DWORD dwFlags, HRESULT dwExpectRe
}
static
void
test_url_canonicalize
(
int
index
,
const
char
*
szUrl
,
DWORD
dwFlags
,
HRESULT
dwExpectReturn
,
const
char
*
szExpectUrl
,
BOOL
todo
)
static
void
test_url_canonicalize
(
int
index
,
const
char
*
szUrl
,
DWORD
dwFlags
,
HRESULT
dwExpectReturn
,
HRESULT
dwExpectReturnAlt
,
const
char
*
szExpectUrl
,
BOOL
todo
)
{
CHAR
szReturnUrl
[
INTERNET_MAX_URL_LENGTH
];
WCHAR
wszReturnUrl
[
INTERNET_MAX_URL_LENGTH
];
LPWSTR
wszUrl
=
GetWideString
(
szUrl
);
LPWSTR
wszExpectUrl
=
GetWideString
(
szExpectUrl
);
LPWSTR
wszConvertedUrl
;
HRESULT
ret
;
DWORD
dwSize
;
dwSize
=
INTERNET_MAX_URL_LENGTH
;
ok
(
UrlCanonicalizeA
(
szUrl
,
NULL
,
&
dwSize
,
dwFlags
)
!=
dwExpectReturn
,
"Unexpected return for NULL buffer, index %d
\n
"
,
index
);
ok
(
UrlCanonicalizeA
(
szUrl
,
szReturnUrl
,
&
dwSize
,
dwFlags
)
==
dwExpectReturn
,
"UrlCanonicalizeA didn't return 0x%08x, index %d
\n
"
,
dwExpectReturn
,
index
);
ret
=
UrlCanonicalizeA
(
szUrl
,
szReturnUrl
,
&
dwSize
,
dwFlags
);
ok
(
ret
==
dwExpectReturn
||
ret
==
dwExpectReturnAlt
,
"UrlCanonicalizeA failed: expected=0x%08x or 0x%08x, got=0x%08x, index %d
\n
"
,
dwExpectReturn
,
dwExpectReturnAlt
,
ret
,
index
);
if
(
todo
)
todo_wine
ok
(
strcmp
(
szReturnUrl
,
szExpectUrl
)
==
0
,
"UrlCanonicalizeA dwFlags 0x%08x url '%s' Expected
\"
%s
\"
, but got
\"
%s
\"
, index %d
\n
"
,
dwFlags
,
szUrl
,
szExpectUrl
,
szReturnUrl
,
index
);
...
...
@@ -668,11 +671,12 @@ static void test_UrlCanonicalizeA(void)
"got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)
\n
"
,
hr
,
GetLastError
(),
dwSize
,
szReturnUrl
,
lstrlenA
(
szReturnUrl
),
urllen
);
test_url_canonicalize
(
-
1
,
""
,
0
,
S_OK
,
S_FALSE
/* Vista/win2k8 */
,
""
,
FALSE
);
/* test url-modification */
for
(
i
=
0
;
i
<
sizeof
(
TEST_CANONICALIZE
)
/
sizeof
(
TEST_CANONICALIZE
[
0
]);
i
++
)
{
test_url_canonicalize
(
i
,
TEST_CANONICALIZE
[
i
].
url
,
TEST_CANONICALIZE
[
i
].
flags
,
TEST_CANONICALIZE
[
i
].
expectret
,
TEST_CANONICALIZE
[
i
].
expecturl
,
TEST_CANONICALIZE
[
i
].
expectret
,
TEST_CANONICALIZE
[
i
].
expect
ret
,
TEST_CANONICALIZE
[
i
].
expect
url
,
TEST_CANONICALIZE
[
i
].
todo
);
}
}
...
...
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