Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
cc88c5a3
Commit
cc88c5a3
authored
14 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mshtml: Added IPersistPropertyBag calls test.
parent
067092c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/mshtml/tests/activex.c
+69
-15
69 additions, 15 deletions
dlls/mshtml/tests/activex.c
with
69 additions
and
15 deletions
dlls/mshtml/tests/activex.c
+
69
−
15
View file @
cc88c5a3
...
...
@@ -60,6 +60,8 @@ DEFINE_EXPECT(CreateInstance);
DEFINE_EXPECT
(
FreezeEvents_TRUE
);
DEFINE_EXPECT
(
FreezeEvents_FALSE
);
DEFINE_EXPECT
(
QuickActivate
);
DEFINE_EXPECT
(
IPersistPropertyBag_InitNew
);
DEFINE_EXPECT
(
IPersistPropertyBag_Load
);
static
HWND
container_hwnd
;
...
...
@@ -68,18 +70,6 @@ static HWND container_hwnd;
static
const
GUID
CLSID_TestActiveX
=
{
0x178fc163
,
0xf585
,
0x4e24
,{
0x9c
,
0x13
,
0x4b
,
0xb7
,
0xf6
,
0x68
,
0x07
,
0x46
}};
static
const
char
*
debugstr_guid
(
REFIID
riid
)
{
static
char
buf
[
50
];
sprintf
(
buf
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
riid
->
Data1
,
riid
->
Data2
,
riid
->
Data3
,
riid
->
Data4
[
0
],
riid
->
Data4
[
1
],
riid
->
Data4
[
2
],
riid
->
Data4
[
3
],
riid
->
Data4
[
4
],
riid
->
Data4
[
5
],
riid
->
Data4
[
6
],
riid
->
Data4
[
7
]);
return
buf
;
}
static
const
char
object_ax_str
[]
=
"<html><head></head><body>"
"<object classid=
\"
clsid:"
TESTACTIVEX_CLSID
"
\"
width=
\"
300
\"
height=
\"
200
\"
id=
\"
objid
\"
>"
...
...
@@ -102,7 +92,7 @@ static const REFIID pluginhost_iids[] = {
NULL
};
static
const
char
*
d
b
gstr_guid
(
REFIID
riid
)
static
const
char
*
d
ebu
gstr_guid
(
REFIID
riid
)
{
static
char
buf
[
50
];
...
...
@@ -138,7 +128,7 @@ static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids)
for
(
piid
=
iids
;
*
piid
;
piid
++
)
{
hres
=
IDispatch_QueryInterface
(
iface
,
*
piid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get %s interface: %08x
\n
"
,
d
b
gstr_guid
(
*
piid
),
hres
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get %s interface: %08x
\n
"
,
d
ebu
gstr_guid
(
*
piid
),
hres
);
if
(
SUCCEEDED
(
hres
))
IUnknown_Release
(
unk
);
}
...
...
@@ -280,6 +270,62 @@ static const IQuickActivateVtbl QuickActivateVtbl = {
static
IQuickActivate
QuickActivate
=
{
&
QuickActivateVtbl
};
static
HRESULT
WINAPI
PersistPropertyBag_QueryInterface
(
IPersistPropertyBag
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
return
ax_qi
(
riid
,
ppv
);
}
static
ULONG
WINAPI
PersistPropertyBag_AddRef
(
IPersistPropertyBag
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
PersistPropertyBag_Release
(
IPersistPropertyBag
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
PersistPropertyBag_GetClassID
(
IPersistPropertyBag
*
face
,
CLSID
*
pClassID
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PersistPropertyBag_InitNew
(
IPersistPropertyBag
*
face
)
{
CHECK_EXPECT
(
IPersistPropertyBag_InitNew
);
return
S_OK
;
}
static
HRESULT
WINAPI
PersistPropertyBag_Load
(
IPersistPropertyBag
*
face
,
IPropertyBag
*
pPropBag
,
IErrorLog
*
pErrorLog
)
{
CHECK_EXPECT
(
IPersistPropertyBag_Load
);
ok
(
pPropBag
!=
NULL
,
"pPropBag == NULL
\n
"
);
ok
(
!
pErrorLog
,
"pErrorLog != NULL
\n
"
);
return
S_OK
;
}
static
HRESULT
WINAPI
PersistPropertyBag_Save
(
IPersistPropertyBag
*
face
,
IPropertyBag
*
pPropBag
,
BOOL
fClearDisrty
,
BOOL
fSaveAllProperties
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
const
IPersistPropertyBagVtbl
PersistPropertyBagVtbl
=
{
PersistPropertyBag_QueryInterface
,
PersistPropertyBag_AddRef
,
PersistPropertyBag_Release
,
PersistPropertyBag_GetClassID
,
PersistPropertyBag_InitNew
,
PersistPropertyBag_Load
,
PersistPropertyBag_Save
};
static
IPersistPropertyBag
PersistPropertyBag
=
{
&
PersistPropertyBagVtbl
};
static
HRESULT
ax_qi
(
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IOleControl
))
{
...
...
@@ -292,6 +338,11 @@ static HRESULT ax_qi(REFIID riid, void **ppv)
return
S_OK
;
}
if
(
IsEqualGUID
(
riid
,
&
IID_IPersistPropertyBag
))
{
*
ppv
=
&
PersistPropertyBag
;
return
S_OK
;
}
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
...
...
@@ -351,6 +402,8 @@ static const IClassFactoryVtbl ClassFactoryVtbl = {
ClassFactory_LockServer
};
static
IClassFactory
activex_cf
=
{
&
ClassFactoryVtbl
};
static
HRESULT
cs_qi
(
REFIID
,
void
**
);
static
IOleDocumentView
*
view
;
...
...
@@ -726,7 +779,6 @@ static HRESULT cs_qi(REFIID riid, void **ppv)
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
static
IClassFactory
activex_cf
=
{
&
ClassFactoryVtbl
};
static
IHTMLDocument2
*
notif_doc
;
static
BOOL
doc_complete
;
...
...
@@ -914,6 +966,7 @@ static void test_object_ax(void)
SET_EXPECT
(
FreezeEvents_TRUE
);
SET_EXPECT
(
QuickActivate
);
SET_EXPECT
(
FreezeEvents_FALSE
);
SET_EXPECT
(
IPersistPropertyBag_Load
);
doc
=
create_doc
(
object_ax_str
,
&
called_CreateInstance
);
...
...
@@ -923,6 +976,7 @@ static void test_object_ax(void)
CHECK_CALLED
(
QuickActivate
);
todo_wine
CHECK_CALLED
(
FreezeEvents_FALSE
);
CHECK_CALLED
(
IPersistPropertyBag_Load
);
release_doc
(
doc
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment