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 @@ ...@@ -29,6 +29,7 @@
#include "winbase.h" #include "winbase.h"
#include "winuser.h" #include "winuser.h"
#include "ole2.h" #include "ole2.h"
#include "shlguid.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -290,12 +291,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva ...@@ -290,12 +291,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
HTMLDocument *This = PERSISTMON_THIS(iface); HTMLDocument *This = PERSISTMON_THIS(iface);
IBindCtx *pbind; IBindCtx *pbind;
BindStatusCallback *callback; BindStatusCallback *callback;
IStream *str; IStream *str = NULL;
LPOLESTR url; LPOLESTR url;
HRESULT hres; HRESULT hres;
nsresult nsres; 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) { if(pibc) {
IUnknown *unk = NULL; IUnknown *unk = NULL;
...@@ -330,6 +331,8 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva ...@@ -330,6 +331,8 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
IUnknown_Release(unk); IUnknown_Release(unk);
} }
} }
HTMLDocument_LockContainer(This, TRUE);
hres = IMoniker_GetDisplayName(pimkName, pibc, NULL, &url); hres = IMoniker_GetDisplayName(pimkName, pibc, NULL, &url);
if(FAILED(hres)) { if(FAILED(hres)) {
...@@ -339,6 +342,20 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva ...@@ -339,6 +342,20 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
TRACE("got url: %s\n", debugstr_w(url)); 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) { if(This->nscontainer && !This->nscontainer->stream) {
/* /*
* This is a workaround for older Gecko that doesn't support nsIWebBrowserStream. * This is a workaround for older Gecko that doesn't support nsIWebBrowserStream.
......
...@@ -3,7 +3,7 @@ TOPOBJDIR = ../../.. ...@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
TESTDLL = mshtml.dll TESTDLL = mshtml.dll
IMPORTS = ole32 user32 IMPORTS = ole32 user32 urlmon
EXTRALIBS = -luuid EXTRALIBS = -luuid
CTESTS = \ 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