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
4041c201
Commit
4041c201
authored
Mar 12, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Add tests for Find{First,Next}UrlCacheEntryA functions.
parent
160bc043
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
urlcache.c
dlls/wininet/tests/urlcache.c
+41
-0
No files found.
dlls/wininet/tests/urlcache.c
View file @
4041c201
...
...
@@ -39,7 +39,10 @@ static void test_urlcacheA(void)
BYTE
zero_byte
=
0
;
LPINTERNET_CACHE_ENTRY_INFO
lpCacheEntryInfo
;
DWORD
cbCacheEntryInfo
;
DWORD
cbCacheEntryInfoSaved
;
static
const
FILETIME
filetime_zero
;
HANDLE
hEnumHandle
;
BOOL
found
=
FALSE
;
ret
=
CreateUrlCacheEntry
(
TEST_URL
,
0
,
"html"
,
filename
,
0
);
ok
(
ret
,
"CreateUrlCacheEntry failed with error %d
\n
"
,
GetLastError
());
...
...
@@ -73,6 +76,44 @@ static void test_urlcacheA(void)
ret
=
UnlockUrlCacheEntryFile
(
TEST_URL
,
0
);
ok
(
ret
,
"UnlockUrlCacheEntryFile failed with error %d
\n
"
,
GetLastError
());
/* test Find*UrlCacheEntry functions */
cbCacheEntryInfo
=
0
;
hEnumHandle
=
FindFirstUrlCacheEntry
(
NULL
,
NULL
,
&
cbCacheEntryInfo
);
ok
(
!
hEnumHandle
,
"FindFirstUrlCacheEntry should have failed
\n
"
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"FindFirstUrlCacheEntry should have set last error to ERROR_INSUFFICIENT_BUFFER instead of %d
\n
"
,
GetLastError
());
lpCacheEntryInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cbCacheEntryInfo
*
sizeof
(
char
));
cbCacheEntryInfoSaved
=
cbCacheEntryInfo
;
hEnumHandle
=
FindFirstUrlCacheEntry
(
NULL
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
ok
(
hEnumHandle
!=
NULL
,
"FindFirstUrlCacheEntry failed with error %d
\n
"
,
GetLastError
());
while
(
TRUE
)
{
if
(
!
strcmp
(
lpCacheEntryInfo
->
lpszSourceUrlName
,
TEST_URL
))
{
found
=
TRUE
;
break
;
}
cbCacheEntryInfo
=
cbCacheEntryInfoSaved
;
ret
=
FindNextUrlCacheEntry
(
hEnumHandle
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
if
(
!
ret
)
{
if
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
)
{
lpCacheEntryInfo
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
lpCacheEntryInfo
,
cbCacheEntryInfo
);
cbCacheEntryInfoSaved
=
cbCacheEntryInfo
;
ret
=
FindNextUrlCacheEntry
(
hEnumHandle
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
}
}
ok
(
ret
,
"FindNextUrlCacheEntry failed with error %d
\n
"
,
GetLastError
());
if
(
!
ret
)
break
;
}
ok
(
found
,
"committed url cache entry not found during enumeration
\n
"
);
ret
=
FindCloseUrlCache
(
hEnumHandle
);
ok
(
ret
,
"FindCloseUrlCache failed with error %d
\n
"
,
GetLastError
());
ret
=
DeleteUrlCacheEntry
(
TEST_URL
);
ok
(
ret
,
"DeleteUrlCacheEntry failed with error %d
\n
"
,
GetLastError
());
...
...
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