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
24b886d9
Commit
24b886d9
authored
Jun 02, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Simple tests for InternetGetCookie's parameters.
parent
68d18612
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
cookie.c
dlls/wininet/cookie.c
+6
-0
internet.c
dlls/wininet/tests/internet.c
+30
-0
No files found.
dlls/wininet/cookie.c
View file @
24b886d9
...
...
@@ -264,6 +264,12 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
TRACE
(
"(%s, %s, %p, %p)
\n
"
,
debugstr_w
(
lpszUrl
),
debugstr_w
(
lpszCookieName
),
lpCookieData
,
lpdwSize
);
if
(
!
lpszUrl
)
{
SetLastError
(
ERROR_INTERNET_UNRECOGNIZED_SCHEME
);
return
FALSE
;
}
COOKIE_crackUrlSimple
(
lpszUrl
,
hostName
,
sizeof
(
hostName
)
/
sizeof
(
hostName
[
0
]),
path
,
sizeof
(
path
)
/
sizeof
(
path
[
0
]));
LIST_FOR_EACH
(
cursor
,
&
domain_list
)
...
...
dlls/wininet/tests/internet.c
View file @
24b886d9
...
...
@@ -125,7 +125,10 @@ static void test_null(void)
static
const
WCHAR
szServer
[]
=
{
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szEmpty
[]
=
{
0
};
static
const
WCHAR
szUrl
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'a'
,
'.'
,
'b'
,
'.'
,
'c'
,
0
};
static
const
WCHAR
szExpect
[]
=
{
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
';'
,
' '
,
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
WCHAR
buffer
[
0x20
];
BOOL
r
;
DWORD
sz
;
hi
=
InternetOpenW
(
NULL
,
0
,
NULL
,
NULL
,
0
);
ok
(
hi
!=
NULL
,
"open failed
\n
"
);
...
...
@@ -184,6 +187,33 @@ static void test_null(void)
ok
(
GetLastError
()
==
ERROR_INTERNET_UNRECOGNIZED_SCHEME
,
"wrong error
\n
"
);
}
ok
(
r
==
FALSE
,
"return wrong
\n
"
);
sz
=
0
;
r
=
InternetGetCookieW
(
NULL
,
NULL
,
NULL
,
&
sz
);
ok
(
GetLastError
()
==
ERROR_INTERNET_UNRECOGNIZED_SCHEME
,
"wrong error
\n
"
);
ok
(
r
==
FALSE
,
"return wrong
\n
"
);
r
=
InternetGetCookieW
(
szServer
,
NULL
,
NULL
,
&
sz
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INTERNET_UNRECOGNIZED_SCHEME
,
"wrong error
\n
"
);
}
ok
(
r
==
FALSE
,
"return wrong
\n
"
);
sz
=
0
;
r
=
InternetGetCookieW
(
szUrl
,
szServer
,
NULL
,
&
sz
);
ok
(
r
==
TRUE
,
"return wrong
\n
"
);
todo_wine
{
ok
(
sz
==
30
,
"sz wrong
\n
"
);
}
sz
=
0x20
;
memset
(
buffer
,
0
,
sizeof
buffer
);
r
=
InternetGetCookieW
(
szUrl
,
szServer
,
buffer
,
&
sz
);
ok
(
r
==
TRUE
,
"return wrong
\n
"
);
todo_wine
{
ok
(
sz
==
lstrlenW
(
buffer
),
"sz wrong
\n
"
);
ok
(
!
lstrcmpW
(
szExpect
,
buffer
),
"cookie data wrong
\n
"
);
}
}
START_TEST
(
internet
)
...
...
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