Commit 701885b2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

- Added test of IPersistMoniker::Load.

- Fix Wine to pass the test.
parent fd75880b
......@@ -29,6 +29,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "shlguid.h"
#include "wine/debug.h"
......@@ -290,12 +291,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
HTMLDocument *This = PERSISTMON_THIS(iface);
IBindCtx *pbind;
BindStatusCallback *callback;
IStream *str;
IStream *str = NULL;
LPOLESTR url;
HRESULT hres;
nsresult nsres;
FIXME("(%p)->(%x %p %p %08lx)\n", This, fFullyAvailable, pimkName, pibc, grfMode);
TRACE("(%p)->(%x %p %p %08lx)\n", This, fFullyAvailable, pimkName, pibc, grfMode);
if(pibc) {
IUnknown *unk = NULL;
......@@ -330,6 +331,8 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
IUnknown_Release(unk);
}
}
HTMLDocument_LockContainer(This, TRUE);
hres = IMoniker_GetDisplayName(pimkName, pibc, NULL, &url);
if(FAILED(hres)) {
......@@ -339,6 +342,20 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
TRACE("got url: %s\n", debugstr_w(url));
if(This->client) {
IOleCommandTarget *cmdtrg = NULL;
hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget,
(void**)&cmdtrg);
if(SUCCEEDED(hres)) {
VARIANT var;
V_VT(&var) = VT_I4;
V_I4(&var) = 0;
IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL);
}
}
if(This->nscontainer && !This->nscontainer->stream) {
/*
* This is a workaround for older Gecko that doesn't support nsIWebBrowserStream.
......
......@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = mshtml.dll
IMPORTS = ole32 user32
IMPORTS = ole32 user32 urlmon
EXTRALIBS = -luuid
CTESTS = \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment