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
238a462d
Commit
238a462d
authored
May 16, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
May 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Added test of cookies with long URL.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8264e2de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
internet.c
dlls/wininet/tests/internet.c
+18
-0
No files found.
dlls/wininet/tests/internet.c
View file @
238a462d
...
...
@@ -614,6 +614,7 @@ static void test_cookie_attrs(void)
static
void
test_cookie_url
(
void
)
{
char
long_url
[
5000
]
=
"http://long.url.test.com/"
,
*
p
;
WCHAR
bufw
[
512
];
char
buf
[
512
];
DWORD
len
;
...
...
@@ -640,6 +641,23 @@ static void test_cookie_url(void)
res
=
pInternetGetCookieExW
(
about_blankW
,
NULL
,
bufw
,
&
len
,
0
,
NULL
);
ok
(
!
res
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"InternetGetCookeExW failed: %u, expected ERROR_INVALID_PARAMETER
\n
"
,
GetLastError
());
p
=
long_url
+
strlen
(
long_url
);
memset
(
p
,
'x'
,
long_url
+
sizeof
(
long_url
)
-
p
);
p
+=
(
long_url
+
sizeof
(
long_url
)
-
p
)
-
3
;
p
[
0
]
=
'/'
;
p
[
2
]
=
0
;
res
=
InternetSetCookieA
(
long_url
,
NULL
,
"A=B"
);
ok
(
res
,
"InternetSetCookieA failed: %u
\n
"
,
GetLastError
());
len
=
sizeof
(
buf
);
res
=
InternetGetCookieA
(
long_url
,
NULL
,
buf
,
&
len
);
ok
(
res
,
"InternetGetCookieA failed: %u
\n
"
,
GetLastError
());
ok
(
!
strcmp
(
buf
,
"A=B"
),
"buf = %s
\n
"
,
buf
);
len
=
sizeof
(
buf
);
res
=
InternetGetCookieA
(
"http://long.url.test.com/"
,
NULL
,
buf
,
&
len
);
ok
(
!
res
&&
GetLastError
()
==
ERROR_NO_MORE_ITEMS
,
"InternetGetCookieA failed: %u
\n
"
,
GetLastError
());
}
static
void
test_null
(
void
)
...
...
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