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
54d5fd07
Commit
54d5fd07
authored
Nov 21, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Added HlinkCreateExtensionServices tests.
parent
8208e81d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
hlink.c
dlls/hlink/tests/hlink.c
+53
-0
No files found.
dlls/hlink/tests/hlink.c
View file @
54d5fd07
...
...
@@ -2,6 +2,7 @@
* Implementation of hyperlinking (hlink.dll)
*
* Copyright 2006 Mike McCormack
* Copyright 2007 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -342,6 +343,57 @@ static void test_special_reference(void)
ok
(
ref
==
NULL
,
"ref=%p
\n
"
,
ref
);
}
static
void
test_HlinkCreateExtensionServices
(
void
)
{
IAuthenticate
*
authenticate
;
LPWSTR
password
,
username
;
HWND
hwnd
;
HRESULT
hres
;
static
const
WCHAR
usernameW
[]
=
{
'u'
,
's'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
passwordW
[]
=
{
'p'
,
'a'
,
's'
,
's'
,
0
};
hres
=
HlinkCreateExtensionServices
(
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
&
IID_IAuthenticate
,
(
void
**
)
&
authenticate
);
ok
(
hres
==
S_OK
,
"HlinkCreateExtensionServices failed: %08x
\n
"
,
hres
);
ok
(
authenticate
!=
NULL
,
"HlinkCreateExtensionServices returned NULL
\n
"
);
password
=
username
=
(
void
*
)
0xdeadbeef
;
hwnd
=
(
void
*
)
0xdeadbeef
;
hres
=
IAuthenticate_Authenticate
(
authenticate
,
&
hwnd
,
&
username
,
&
password
);
ok
(
hres
==
S_OK
,
"Authenticate failed: %08x
\n
"
,
hres
);
ok
(
!
hwnd
,
"hwnd != NULL
\n
"
);
ok
(
!
username
,
"username != NULL
\n
"
);
ok
(
!
password
,
"password != NULL
\n
"
);
IAuthenticate_Release
(
authenticate
);
hres
=
HlinkCreateExtensionServices
(
NULL
,
(
HWND
)
0xfefefefe
,
usernameW
,
passwordW
,
NULL
,
&
IID_IAuthenticate
,
(
void
**
)
&
authenticate
);
ok
(
hres
==
S_OK
,
"HlinkCreateExtensionServices failed: %08x
\n
"
,
hres
);
ok
(
authenticate
!=
NULL
,
"HlinkCreateExtensionServices returned NULL
\n
"
);
password
=
username
=
NULL
;
hwnd
=
NULL
;
hres
=
IAuthenticate_Authenticate
(
authenticate
,
&
hwnd
,
&
username
,
&
password
);
ok
(
hres
==
S_OK
,
"Authenticate failed: %08x
\n
"
,
hres
);
ok
(
hwnd
==
(
HWND
)
0xfefefefe
,
"hwnd=%p
\n
"
,
hwnd
);
ok
(
!
lstrcmpW
(
username
,
usernameW
),
"unexpected username
\n
"
);
ok
(
!
lstrcmpW
(
password
,
passwordW
),
"unexpected password
\n
"
);
CoTaskMemFree
(
username
);
CoTaskMemFree
(
password
);
password
=
username
=
(
void
*
)
0xdeadbeef
;
hwnd
=
(
void
*
)
0xdeadbeef
;
hres
=
IAuthenticate_Authenticate
(
authenticate
,
&
hwnd
,
NULL
,
&
password
);
ok
(
hres
==
E_INVALIDARG
,
"Authenticate failed: %08x
\n
"
,
hres
);
ok
(
password
==
(
void
*
)
0xdeadbeef
,
"password = %p
\n
"
,
password
);
ok
(
hwnd
==
(
void
*
)
0xdeadbeef
,
"hwnd = %p
\n
"
,
hwnd
);
IAuthenticate_Release
(
authenticate
);
}
START_TEST
(
hlink
)
{
CoInitialize
(
NULL
);
...
...
@@ -350,6 +402,7 @@ START_TEST(hlink)
test_reference
();
test_persist
();
test_special_reference
();
test_HlinkCreateExtensionServices
();
CoUninitialize
();
}
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