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
29ce9a1f
Commit
29ce9a1f
authored
Apr 08, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Clean tests skipping.
parent
c6dba02e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
23 deletions
+25
-23
intshcut.c
dlls/shdocvw/tests/intshcut.c
+25
-23
No files found.
dlls/shdocvw/tests/intshcut.c
View file @
29ce9a1f
...
...
@@ -120,15 +120,12 @@ static void test_QueryInterface(void)
IUnknown
*
pUnknown
;
hr
=
CoCreateInstance
(
&
CLSID_InternetShortcut
,
NULL
,
CLSCTX_ALL
,
&
IID_IUnknown
,
(
void
**
)
&
pUnknown
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
hr
==
S_OK
,
"Could not create InternetShortcut object: %08x
\n
"
,
hr
);
can_query_interface
(
pUnknown
,
&
IID_IUniformResourceLocatorA
);
can_query_interface
(
pUnknown
,
&
IID_IUniformResourceLocatorW
);
can_query_interface
(
pUnknown
,
&
IID_IPersistFile
);
IUnknown_Release
(
pUnknown
);
}
else
skip
(
"could not create a CLSID_InternetShortcut for QueryInterface tests, hr=0x%x
\n
"
,
hr
);
}
static
CHAR
*
set_and_get_url
(
IUniformResourceLocatorA
*
urlA
,
LPCSTR
input
,
DWORD
flags
)
...
...
@@ -176,15 +173,17 @@ static BOOL check_ie(void)
static
void
test_ReadAndWriteProperties
(
void
)
{
int
iconIndex
=
7
;
PROPSPEC
ps
[
2
];
HRESULT
hr
;
IUniformResourceLocatorA
*
urlA
;
IUniformResourceLocatorA
*
urlAFromFile
;
WCHAR
fileNameW
[
MAX_PATH
];
static
const
WCHAR
shortcutW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
's'
,
'h'
,
'o'
,
'r'
,
't'
,
'c'
,
'u'
,
't'
,
'.'
,
'u'
,
'r'
,
'l'
,
0
};
WCHAR
iconPath
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'/'
,
'C'
,
':'
,
'/'
,
'a'
,
'r'
,
'b'
,
'i'
,
't'
,
'r'
,
'a'
,
'r'
,
'y'
,
'/'
,
'i'
,
'c'
,
'o'
,
'n'
,
'/'
,
'p'
,
'a'
,
't'
,
'h'
,
0
};
int
iconIndex
=
7
;
char
testurl
[]
=
"http://some/bogus/url.html"
;
PROPSPEC
ps
[
2
];
ps
[
0
].
ulKind
=
PRSPEC_PROPID
;
U
(
ps
[
0
]).
propid
=
PID_IS_ICONFILE
;
ps
[
1
].
ulKind
=
PRSPEC_PROPID
;
...
...
@@ -290,13 +289,12 @@ static void test_ReadAndWriteProperties(void)
static
void
test_NullURLs
(
void
)
{
LPSTR
url
=
NULL
;
HRESULT
hr
;
IUniformResourceLocatorA
*
urlA
;
hr
=
CoCreateInstance
(
&
CLSID_InternetShortcut
,
NULL
,
CLSCTX_ALL
,
&
IID_IUniformResourceLocatorA
,
(
void
**
)
&
urlA
);
if
(
SUCCEEDED
(
hr
))
{
LPSTR
url
=
NULL
;
ok
(
hr
==
S_OK
,
"Could not create InternetShortcut object: %08x
\n
"
,
hr
);
hr
=
urlA
->
lpVtbl
->
GetURL
(
urlA
,
&
url
);
ok
(
SUCCEEDED
(
hr
),
"getting uninitialized URL unexpectedly failed, hr=0x%x
\n
"
,
hr
);
...
...
@@ -310,9 +308,6 @@ static void test_NullURLs(void)
ok
(
url
==
NULL
,
"URL unexpectedly not NULL but %s
\n
"
,
url
);
urlA
->
lpVtbl
->
Release
(
urlA
);
}
else
skip
(
"could not create a CLSID_InternetShortcut for NullURL tests, hr=0x%x
\n
"
,
hr
);
}
static
void
test_SetURLFlags
(
void
)
...
...
@@ -321,38 +316,45 @@ static void test_SetURLFlags(void)
IUniformResourceLocatorA
*
urlA
;
hr
=
CoCreateInstance
(
&
CLSID_InternetShortcut
,
NULL
,
CLSCTX_ALL
,
&
IID_IUniformResourceLocatorA
,
(
void
**
)
&
urlA
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
hr
==
S_OK
,
"Could not create InternetShortcut object: %08x
\n
"
,
hr
);
check_string_transform
(
urlA
,
"somerandomstring"
,
0
,
"somerandomstring"
);
check_string_transform
(
urlA
,
"www.winehq.org"
,
0
,
"www.winehq.org"
);
todo_wine
{
check_string_transform
(
urlA
,
"www.winehq.org"
,
IURL_SETURL_FL_GUESS_PROTOCOL
,
"http://www.winehq.org/"
);
todo_wine
check_string_transform
(
urlA
,
"ftp.winehq.org"
,
IURL_SETURL_FL_GUESS_PROTOCOL
,
"ftp://ftp.winehq.org/"
);
}
urlA
->
lpVtbl
->
Release
(
urlA
);
}
else
skip
(
"could not create a CLSID_InternetShortcut for SetUrl tests, hr=0x%x
\n
"
,
hr
);
}
static
void
test_InternetShortcut
(
void
)
{
if
(
check_ie
())
{
IUniformResourceLocatorA
*
url
;
HRESULT
hres
;
hres
=
CoCreateInstance
(
&
CLSID_InternetShortcut
,
NULL
,
CLSCTX_ALL
,
&
IID_IUniformResourceLocatorA
,
(
void
**
)
&
url
);
if
(
FAILED
(
hres
))
{
win_skip
(
"Could not create CLSID_InternetShortcut instance: %08x
\n
"
,
hres
);
return
;
}
test_Aggregability
();
test_QueryInterface
();
test_NullURLs
();
test_SetURLFlags
();
test_ReadAndWriteProperties
();
}
}
START_TEST
(
intshcut
)
{
OleInitialize
(
NULL
);
if
(
check_ie
())
test_InternetShortcut
();
else
win_skip
(
"Too old IE
\n
"
);
OleUninitialize
();
}
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