mshtml: Added IHTMLWindow::get_external implementation.
This commit is contained in:
parent
a1970df550
commit
a84520169f
|
@ -662,8 +662,15 @@ static HRESULT WINAPI HTMLWindow2_resizeBy(IHTMLWindow2 *iface, long x, long y)
|
||||||
static HRESULT WINAPI HTMLWindow2_get_external(IHTMLWindow2 *iface, IDispatch **p)
|
static HRESULT WINAPI HTMLWindow2_get_external(IHTMLWindow2 *iface, IDispatch **p)
|
||||||
{
|
{
|
||||||
HTMLWindow *This = HTMLWINDOW2_THIS(iface);
|
HTMLWindow *This = HTMLWINDOW2_THIS(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
*p = NULL;
|
||||||
|
|
||||||
|
if(!This->doc->hostui)
|
||||||
|
return S_OK;
|
||||||
|
|
||||||
|
return IDocHostUIHandler_GetExternal(This->doc->hostui, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef HTMLWINDOW2_THIS
|
#undef HTMLWINDOW2_THIS
|
||||||
|
|
|
@ -127,6 +127,7 @@ DEFINE_EXPECT(OnFocus_FALSE);
|
||||||
DEFINE_EXPECT(RequestUIActivate);
|
DEFINE_EXPECT(RequestUIActivate);
|
||||||
DEFINE_EXPECT(InPlaceFrame_SetBorderSpace);
|
DEFINE_EXPECT(InPlaceFrame_SetBorderSpace);
|
||||||
DEFINE_EXPECT(InPlaceUIWindow_SetActiveObject);
|
DEFINE_EXPECT(InPlaceUIWindow_SetActiveObject);
|
||||||
|
DEFINE_EXPECT(GetExternal);
|
||||||
|
|
||||||
static IUnknown *doc_unk;
|
static IUnknown *doc_unk;
|
||||||
static BOOL expect_LockContainer_fLock;
|
static BOOL expect_LockContainer_fLock;
|
||||||
|
@ -1861,8 +1862,9 @@ static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface,
|
||||||
|
|
||||||
static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface, IDispatch **ppDispatch)
|
static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface, IDispatch **ppDispatch)
|
||||||
{
|
{
|
||||||
ok(0, "unexpected call\n");
|
CHECK_EXPECT(GetExternal);
|
||||||
return E_NOTIMPL;
|
*ppDispatch = (void*)1;
|
||||||
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, DWORD dwTranslate,
|
static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, DWORD dwTranslate,
|
||||||
|
@ -3444,6 +3446,36 @@ static void test_Navigate(IUnknown *unk)
|
||||||
IHlinkTarget_Release(hlink);
|
IHlinkTarget_Release(hlink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_external(IUnknown *unk, BOOL initialized)
|
||||||
|
{
|
||||||
|
IDispatch *external;
|
||||||
|
IHTMLDocument2 *doc;
|
||||||
|
IHTMLWindow2 *htmlwin;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument2, (void**)&doc);
|
||||||
|
ok(hres == S_OK, "QueryInterface(IID_IHTMLWindow2) failed: %08x\n", hres);
|
||||||
|
|
||||||
|
hres = IHTMLDocument2_get_parentWindow(doc, &htmlwin);
|
||||||
|
IHTMLDocument2_Release(doc);
|
||||||
|
ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
|
||||||
|
|
||||||
|
if(initialized)
|
||||||
|
SET_EXPECT(GetExternal);
|
||||||
|
external = (void*)0xdeadbeef;
|
||||||
|
hres = IHTMLWindow2_get_external(htmlwin, &external);
|
||||||
|
if(initialized) {
|
||||||
|
ok(hres == S_FALSE, "get_external failed: %08x\n", hres);
|
||||||
|
CHECK_CALLED(GetExternal);
|
||||||
|
ok(external == (void*)1, "external != NULL\n");
|
||||||
|
}else {
|
||||||
|
ok(hres == S_OK, "get_external failed: %08x\n", hres);
|
||||||
|
ok(external == NULL, "external != NULL\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
IHTMLWindow2_Release(htmlwin);
|
||||||
|
}
|
||||||
|
|
||||||
static void test_StreamLoad(IUnknown *unk)
|
static void test_StreamLoad(IUnknown *unk)
|
||||||
{
|
{
|
||||||
IPersistStreamInit *init;
|
IPersistStreamInit *init;
|
||||||
|
@ -3528,6 +3560,7 @@ static void test_HTMLDocument(enum load_state_t ls)
|
||||||
test_QueryInterface(unk);
|
test_QueryInterface(unk);
|
||||||
test_IsDirty(unk, S_FALSE);
|
test_IsDirty(unk, S_FALSE);
|
||||||
test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED);
|
test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED);
|
||||||
|
test_external(unk, FALSE);
|
||||||
test_ConnectionPointContainer(unk);
|
test_ConnectionPointContainer(unk);
|
||||||
test_GetCurMoniker(unk, NULL, NULL);
|
test_GetCurMoniker(unk, NULL, NULL);
|
||||||
test_Persist(unk);
|
test_Persist(unk);
|
||||||
|
@ -3550,6 +3583,7 @@ static void test_HTMLDocument(enum load_state_t ls)
|
||||||
test_OleCommandTarget(unk);
|
test_OleCommandTarget(unk);
|
||||||
test_OnAmbientPropertyChange(unk);
|
test_OnAmbientPropertyChange(unk);
|
||||||
test_Window(unk, TRUE);
|
test_Window(unk, TRUE);
|
||||||
|
test_external(unk, TRUE);
|
||||||
|
|
||||||
test_UIDeactivate();
|
test_UIDeactivate();
|
||||||
test_OleCommandTarget(unk);
|
test_OleCommandTarget(unk);
|
||||||
|
|
Loading…
Reference in New Issue