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
2d42f291
Commit
2d42f291
authored
Jan 29, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Implement IsDomainLegalCookieDomainW.
parent
7c1e8a9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
157 additions
and
1 deletion
+157
-1
cookie.c
dlls/wininet/cookie.c
+25
-0
internet.c
dlls/wininet/tests/internet.c
+131
-0
wininet.spec
dlls/wininet/wininet.spec
+1
-1
No files found.
dlls/wininet/cookie.c
View file @
2d42f291
...
@@ -696,3 +696,28 @@ BOOL WINAPI InternetSetPerSiteCookieDecisionW( LPCWSTR pchHostName, DWORD dwDeci
...
@@ -696,3 +696,28 @@ BOOL WINAPI InternetSetPerSiteCookieDecisionW( LPCWSTR pchHostName, DWORD dwDeci
FIXME
(
"(%s, 0x%08x) stub
\n
"
,
debugstr_w
(
pchHostName
),
dwDecision
);
FIXME
(
"(%s, 0x%08x) stub
\n
"
,
debugstr_w
(
pchHostName
),
dwDecision
);
return
FALSE
;
return
FALSE
;
}
}
/***********************************************************************
* IsDomainLegalCookieDomainW (WININET.@)
*/
BOOL
WINAPI
IsDomainLegalCookieDomainW
(
LPCWSTR
s1
,
LPCWSTR
s2
)
{
const
WCHAR
*
p
;
FIXME
(
"(%s, %s)
\n
"
,
debugstr_w
(
s1
),
debugstr_w
(
s2
));
if
(
!
s1
||
!
s2
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
s1
[
0
]
==
'.'
||
!
s1
[
0
]
||
s2
[
0
]
==
'.'
||
!
s2
[
0
])
{
SetLastError
(
ERROR_INVALID_NAME
);
return
FALSE
;
}
if
(
!
(
p
=
strchrW
(
s2
,
'.'
)))
return
FALSE
;
if
(
strchrW
(
p
+
1
,
'.'
)
&&
!
strcmpW
(
p
+
1
,
s1
))
return
TRUE
;
else
if
(
!
strcmpW
(
s1
,
s2
))
return
TRUE
;
return
FALSE
;
}
dlls/wininet/tests/internet.c
View file @
2d42f291
...
@@ -31,6 +31,7 @@ static BOOL (WINAPI *pInternetTimeFromSystemTimeA)(CONST SYSTEMTIME *,DWORD ,LPS
...
@@ -31,6 +31,7 @@ static BOOL (WINAPI *pInternetTimeFromSystemTimeA)(CONST SYSTEMTIME *,DWORD ,LPS
static
BOOL
(
WINAPI
*
pInternetTimeFromSystemTimeW
)(
CONST
SYSTEMTIME
*
,
DWORD
,
LPWSTR
,
DWORD
);
static
BOOL
(
WINAPI
*
pInternetTimeFromSystemTimeW
)(
CONST
SYSTEMTIME
*
,
DWORD
,
LPWSTR
,
DWORD
);
static
BOOL
(
WINAPI
*
pInternetTimeToSystemTimeA
)(
LPCSTR
,
SYSTEMTIME
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pInternetTimeToSystemTimeA
)(
LPCSTR
,
SYSTEMTIME
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pInternetTimeToSystemTimeW
)(
LPCWSTR
,
SYSTEMTIME
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pInternetTimeToSystemTimeW
)(
LPCWSTR
,
SYSTEMTIME
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pIsDomainLegalCookieDomainW
)(
LPCWSTR
,
LPCWSTR
);
/* ############################### */
/* ############################### */
...
@@ -526,6 +527,131 @@ static void InternetTimeToSystemTimeW_test(void)
...
@@ -526,6 +527,131 @@ static void InternetTimeToSystemTimeW_test(void)
ok
(
ret
,
"InternetTimeToSystemTimeW failed (%u)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InternetTimeToSystemTimeW failed (%u)
\n
"
,
GetLastError
()
);
}
}
static
void
test_IsDomainLegalCookieDomainW
(
void
)
{
BOOL
ret
;
DWORD
error
;
static
const
WCHAR
empty
[]
=
{
0
};
static
const
WCHAR
dot
[]
=
{
'.'
,
0
};
static
const
WCHAR
uk
[]
=
{
'u'
,
'k'
,
0
};
static
const
WCHAR
com
[]
=
{
'c'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
dot_com
[]
=
{
'.'
,
'c'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
gmail_com
[]
=
{
'g'
,
'm'
,
'a'
,
'i'
,
'l'
,
'.'
,
'c'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
dot_gmail_com
[]
=
{
'.'
,
'g'
,
'm'
,
'a'
,
'i'
,
'l'
,
'.'
,
'c'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
mail_gmail_com
[]
=
{
'm'
,
'a'
,
'i'
,
'l'
,
'.'
,
'g'
,
'm'
,
'a'
,
'i'
,
'l'
,
'.'
,
'c'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
gmail_co_uk
[]
=
{
'g'
,
'm'
,
'a'
,
'i'
,
'l'
,
'.'
,
'c'
,
'o'
,
'.'
,
'u'
,
'k'
,
0
};
static
const
WCHAR
co_uk
[]
=
{
'c'
,
'o'
,
'.'
,
'u'
,
'k'
,
0
};
static
const
WCHAR
dot_co_uk
[]
=
{
'.'
,
'c'
,
'o'
,
'.'
,
'u'
,
'k'
,
0
};
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
NULL
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"got %u expected ERROR_INVALID_PARAMETER
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
com
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"got %u expected ERROR_INVALID_PARAMETER
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
NULL
,
gmail_com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"got %u expected ERROR_INVALID_PARAMETER
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
empty
,
gmail_com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"got %u expected ERROR_INVALID_NAME
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
com
,
empty
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"got %u expected ERROR_INVALID_NAME
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
gmail_com
,
dot
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"got %u expected ERROR_INVALID_NAME
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
dot
,
gmail_com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"got %u expected ERROR_INVALID_NAME
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
com
,
com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
0xdeadbeef
,
"got %u expected 0xdeadbeef
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
com
,
dot_com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"got %u expected ERROR_INVALID_NAME
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
dot_com
,
com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"got %u expected ERROR_INVALID_NAME
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
com
,
gmail_com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ok
(
error
==
0xdeadbeef
,
"got %u expected 0xdeadbeef
\n
"
,
error
);
ret
=
pIsDomainLegalCookieDomainW
(
gmail_com
,
gmail_com
);
ok
(
ret
,
"IsDomainLegalCookieDomainW failed
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
gmail_co_uk
,
co_uk
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW failed
\n
"
);
ok
(
error
==
0xdeadbeef
,
"got %u expected 0xdeadbeef
\n
"
,
error
);
ret
=
pIsDomainLegalCookieDomainW
(
uk
,
co_uk
);
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ret
=
pIsDomainLegalCookieDomainW
(
gmail_co_uk
,
dot_co_uk
);
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ret
=
pIsDomainLegalCookieDomainW
(
gmail_co_uk
,
gmail_co_uk
);
ok
(
ret
,
"IsDomainLegalCookieDomainW failed
\n
"
);
ret
=
pIsDomainLegalCookieDomainW
(
gmail_com
,
com
);
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
pIsDomainLegalCookieDomainW
(
dot_gmail_com
,
mail_gmail_com
);
error
=
GetLastError
();
ok
(
!
ret
,
"IsDomainLegalCookieDomainW failed
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"got %u expected ERROR_INVALID_NAME
\n
"
,
error
);
ret
=
pIsDomainLegalCookieDomainW
(
gmail_com
,
mail_gmail_com
);
ok
(
ret
,
"IsDomainLegalCookieDomainW failed
\n
"
);
ret
=
pIsDomainLegalCookieDomainW
(
mail_gmail_com
,
gmail_com
);
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ret
=
pIsDomainLegalCookieDomainW
(
mail_gmail_com
,
com
);
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ret
=
pIsDomainLegalCookieDomainW
(
dot_gmail_com
,
mail_gmail_com
);
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
ret
=
pIsDomainLegalCookieDomainW
(
mail_gmail_com
,
dot_gmail_com
);
ok
(
!
ret
,
"IsDomainLegalCookieDomainW succeeded
\n
"
);
}
/* ############################### */
/* ############################### */
START_TEST
(
internet
)
START_TEST
(
internet
)
...
@@ -536,6 +662,7 @@ START_TEST(internet)
...
@@ -536,6 +662,7 @@ START_TEST(internet)
pInternetTimeFromSystemTimeW
=
(
void
*
)
GetProcAddress
(
hdll
,
"InternetTimeFromSystemTimeW"
);
pInternetTimeFromSystemTimeW
=
(
void
*
)
GetProcAddress
(
hdll
,
"InternetTimeFromSystemTimeW"
);
pInternetTimeToSystemTimeA
=
(
void
*
)
GetProcAddress
(
hdll
,
"InternetTimeToSystemTimeA"
);
pInternetTimeToSystemTimeA
=
(
void
*
)
GetProcAddress
(
hdll
,
"InternetTimeToSystemTimeA"
);
pInternetTimeToSystemTimeW
=
(
void
*
)
GetProcAddress
(
hdll
,
"InternetTimeToSystemTimeW"
);
pInternetTimeToSystemTimeW
=
(
void
*
)
GetProcAddress
(
hdll
,
"InternetTimeToSystemTimeW"
);
pIsDomainLegalCookieDomainW
=
(
void
*
)
GetProcAddress
(
hdll
,
(
LPCSTR
)
117
);
test_InternetCanonicalizeUrlA
();
test_InternetCanonicalizeUrlA
();
test_InternetQueryOptionA
();
test_InternetQueryOptionA
();
...
@@ -552,4 +679,8 @@ START_TEST(internet)
...
@@ -552,4 +679,8 @@ START_TEST(internet)
InternetTimeToSystemTimeA_test
();
InternetTimeToSystemTimeA_test
();
InternetTimeToSystemTimeW_test
();
InternetTimeToSystemTimeW_test
();
}
}
if
(
!
pIsDomainLegalCookieDomainW
)
skip
(
"skipping IsDomainLegalCookieDomainW tests
\n
"
);
else
test_IsDomainLegalCookieDomainW
();
}
}
dlls/wininet/wininet.spec
View file @
2d42f291
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
111 stub -noname ExportCookieFileW
111 stub -noname ExportCookieFileW
112 stub -noname IsProfilesEnabled
112 stub -noname IsProfilesEnabled
116 stub -noname IsDomainlegalCookieDomainA
116 stub -noname IsDomainlegalCookieDomainA
117 st
ub -noname IsDomainLegalCookieDomainW
117 st
dcall -noname IsDomainLegalCookieDomainW(wstr wstr)
118 stub -noname FindP3PPolicySymbol
118 stub -noname FindP3PPolicySymbol
120 stub -noname MapResourceToPolicy
120 stub -noname MapResourceToPolicy
121 stub -noname GetP3PPolicy
121 stub -noname GetP3PPolicy
...
...
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