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
e2ce3cff
Commit
e2ce3cff
authored
Dec 23, 2010
by
Greg Geldorp
Committed by
Alexandre Julliard
Dec 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw/tests: Need to save .url before committing extra props for IE6.
parent
c6682ef5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
16 deletions
+26
-16
intshcut.c
dlls/shdocvw/intshcut.c
+7
-1
intshcut.c
dlls/shdocvw/tests/intshcut.c
+19
-15
No files found.
dlls/shdocvw/intshcut.c
View file @
e2ce3cff
...
...
@@ -610,7 +610,13 @@ static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileNam
if
SUCCEEDED
(
hr
)
{
hr
=
IPropertyStorage_ReadMultiple
(
pPropStgRead
,
2
,
ps
,
pvread
);
if
SUCCEEDED
(
hr
)
if
(
hr
==
S_FALSE
)
{
/* None of the properties are present, that's ok */
hr
=
S_OK
;
IPropertyStorage_Release
(
pPropStgRead
);
}
else
if
SUCCEEDED
(
hr
)
{
char
indexString
[
50
];
len
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
pvread
[
0
].
u
.
pwszVal
,
-
1
,
NULL
,
0
,
0
,
0
);
...
...
dlls/shdocvw/tests/intshcut.c
View file @
e2ce3cff
...
...
@@ -200,6 +200,20 @@ static void test_ReadAndWriteProperties(void)
IPropertyStorage
*
pPropStgWrite
;
IPropertySetStorage
*
pPropSetStg
;
PROPVARIANT
pv
[
2
];
/* We need to set a URL -- IPersistFile refuses to save without one. */
hr
=
urlA
->
lpVtbl
->
SetURL
(
urlA
,
testurl
,
0
);
ok
(
hr
==
S_OK
,
"Failed to set a URL. hr=0x%x
\n
"
,
hr
);
/* Write this shortcut out to a file so that we can test reading it in again. */
hr
=
urlA
->
lpVtbl
->
QueryInterface
(
urlA
,
&
IID_IPersistFile
,
(
void
**
)
&
pf
);
ok
(
hr
==
S_OK
,
"Failed to get the IPersistFile for writing. hr=0x%x
\n
"
,
hr
);
hr
=
IPersistFile_Save
(
pf
,
fileNameW
,
TRUE
);
ok
(
hr
==
S_OK
,
"Failed to save via IPersistFile. hr=0x%x
\n
"
,
hr
);
IPersistFile_Release
(
pf
);
pv
[
0
].
vt
=
VT_LPWSTR
;
pv
[
0
].
pwszVal
=
(
void
*
)
iconPath
;
pv
[
1
].
vt
=
VT_I4
;
...
...
@@ -217,19 +231,6 @@ static void test_ReadAndWriteProperties(void)
ok
(
hr
==
S_OK
,
"Failed to commit properties, hr=0x%x
\n
"
,
hr
);
pPropStgWrite
->
lpVtbl
->
Release
(
pPropStgWrite
);
/* We need to set a URL -- IPersistFile refuses to save without one. */
hr
=
urlA
->
lpVtbl
->
SetURL
(
urlA
,
testurl
,
0
);
ok
(
hr
==
S_OK
,
"Failed to set a URL. hr=0x%x
\n
"
,
hr
);
/* Write this shortcut out to a file so that we can test reading it in again. */
hr
=
urlA
->
lpVtbl
->
QueryInterface
(
urlA
,
&
IID_IPersistFile
,
(
void
**
)
&
pf
);
ok
(
hr
==
S_OK
,
"Failed to get the IPersistFile for writing. hr=0x%x
\n
"
,
hr
);
hr
=
IPersistFile_Save
(
pf
,
fileNameW
,
TRUE
);
ok
(
hr
==
S_OK
,
"Failed to save via IPersistFile. hr=0x%x
\n
"
,
hr
);
IPersistFile_Release
(
pf
);
urlA
->
lpVtbl
->
Release
(
urlA
);
IPropertySetStorage_Release
(
pPropSetStg
);
}
...
...
@@ -267,9 +268,12 @@ static void test_ReadAndWriteProperties(void)
hr
=
IPropertyStorage_ReadMultiple
(
pPropStgRead
,
2
,
ps
,
pvread
);
ok
(
hr
==
S_OK
,
"Unable to read properties, hr=0x%x
\n
"
,
hr
);
ok
(
pvread
[
1
].
iVal
==
iconIndex
,
"Read wrong icon index: %d
\n
"
,
pvread
[
1
].
iVal
);
todo_wine
/* Wine doesn't yet support setting properties after save */
{
ok
(
pvread
[
1
].
iVal
==
iconIndex
,
"Read wrong icon index: %d
\n
"
,
pvread
[
1
].
iVal
);
ok
(
lstrcmpW
(
pvread
[
0
].
pwszVal
,
iconPath
)
==
0
,
"Wrong icon path read: %s
\n
"
,
wine_dbgstr_w
(
pvread
[
0
].
pwszVal
));
ok
(
lstrcmpW
(
pvread
[
0
].
pwszVal
,
iconPath
)
==
0
,
"Wrong icon path read: %s
\n
"
,
wine_dbgstr_w
(
pvread
[
0
].
pwszVal
));
}
PropVariantClear
(
&
pvread
[
0
]);
PropVariantClear
(
&
pvread
[
1
]);
...
...
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