Jacek Caban : mshtml: Added IOleInPlaceUIWindow tests.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 25 07:28:25 CDT 2007
Module: wine
Branch: master
Commit: b09f5c319e79b91121b517e1825510324ce348d4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b09f5c319e79b91121b517e1825510324ce348d4
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jun 22 23:55:05 2007 +0200
mshtml: Added IOleInPlaceUIWindow tests.
---
dlls/mshtml/tests/htmldoc.c | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index caf3f19..8d3237a 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -1073,7 +1073,8 @@ static IOleContainer OleContainer = { &OleContainerVtbl };
static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv)
{
- return QueryInterface(riid, ppv);
+ ok(0, "unexpected call\n");
+ return E_NOINTERFACE;
}
static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface)
@@ -1118,6 +1119,13 @@ static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface,
return E_NOTIMPL;
}
+static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface,
+ IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
+{
+ ok(0, "unexpected call\n");
+ return E_NOTIMPL;
+}
+
static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface,
IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
{
@@ -1198,6 +1206,20 @@ static const IOleInPlaceFrameVtbl InPlaceFrameVtbl = {
static IOleInPlaceFrame InPlaceFrame = { &InPlaceFrameVtbl };
+static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl = {
+ InPlaceFrame_QueryInterface,
+ InPlaceFrame_AddRef,
+ InPlaceFrame_Release,
+ InPlaceFrame_GetWindow,
+ InPlaceFrame_ContextSensitiveHelp,
+ InPlaceFrame_GetBorder,
+ InPlaceFrame_RequestBorderSpace,
+ InPlaceFrame_SetBorderSpace,
+ InPlaceUIWindow_SetActiveObject,
+};
+
+static IOleInPlaceFrame InPlaceUIWindow = { &InPlaceUIWindowVtbl };
+
static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSiteEx *iface, REFIID riid, void **ppv)
{
return QueryInterface(riid, ppv);
@@ -1258,7 +1280,7 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface,
*ppFrame = &InPlaceFrame;
ok(ppDoc != NULL, "ppDoc = NULL\n");
if(ppDoc)
- *ppDoc = NULL;
+ *ppDoc = (IOleInPlaceUIWindow*)&InPlaceUIWindow;
ok(lprcPosRect != NULL, "lprcPosRect = NULL\n");
if(lprcPosRect)
memcpy(lprcPosRect, &rect, sizeof(RECT));
@@ -2209,8 +2231,6 @@ static HRESULT QueryInterface(REFIID riid, void **ppv)
*ppv = &OleContainer;
else if(IsEqualGUID(&IID_IOleWindow, riid) || IsEqualGUID(&IID_IOleInPlaceSite, riid))
*ppv = &InPlaceSiteEx;
- else if(IsEqualGUID(&IID_IOleInPlaceUIWindow, riid) || IsEqualGUID(&IID_IOleInPlaceFrame, riid))
- *ppv = &InPlaceFrame;
else if(IsEqualGUID(&IID_IOleCommandTarget , riid))
*ppv = &OleCommandTarget;
else if(IsEqualGUID(&IID_IDispatch, riid))
More information about the wine-cvs
mailing list