23#include <shdeprecated.h>
28#include <docobjectservice.h>
30DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
31DEFINE_GUID(
IID_IProxyManager,0x00000008,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
33DEFINE_GUID(SID_SContainerDispatch,0xb722be00,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
35#define DEFINE_EXPECT(func) \
36 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
38#define SET_EXPECT(func) \
39 expect_ ## func = TRUE
41#define SET_CALLED(func) \
42 called_ ## func = TRUE
44#define CHECK_EXPECT2(func) \
46 ok(expect_ ##func, "unexpected call " #func "\n"); \
47 called_ ## func = TRUE; \
50#define CHECK_EXPECT(func) \
52 CHECK_EXPECT2(func); \
53 expect_ ## func = FALSE; \
56#define CHECK_CALLED(func) \
58 ok(called_ ## func, "expected " #func "\n"); \
59 expect_ ## func = called_ ## func = FALSE; \
62#define CHECK_NOT_CALLED(func) \
64 ok(!called_ ## func, "unexpected " #func "\n"); \
65 expect_ ## func = called_ ## func = FALSE; \
68#define CHECK_CALLED_BROKEN(func) \
70 ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \
71 expect_ ## func = called_ ## func = FALSE; \
74#define CLEAR_CALLED(func) \
75 expect_ ## func = called_ ## func = FALSE
221"<head><link rel=\"stylesheet\" type=\"text/css\" href=\"test.css\"></head>"
222"<body><div>test</div></body>"
225static const char css_data[] =
"body {color: red; margin: 0}";
228 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',
't',
'e',
's',
't',
's',
'/',
'w',
'i',
'n',
'e',
'h',
'q',
'_',
's',
'n',
'a',
'p',
's',
'h',
'o',
't',
'/',0};
230static const WCHAR doc_url[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
'd',
'o',
'c',0};
232#define DOCHOST_DOCCANNAVIGATE 0
233#define WM_CONTINUE_BINDING (WM_APP+1)
238#define test_readyState(u) _test_readyState(__LINE__,u)
242 {
'T',
'i',
'm',
'e',
's',
' ',
'N',
'e',
'w',
' ',
'R',
'o',
'm',
'a',
'n',0};
244 {
'A',
'r',
'i',
'a',
'l',0};
265 while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
266 if (!*p2)
return str;
299 if (pGetThreadUILanguage)
301 if (pGetUserDefaultUILanguage)
315 IUnknown_Release(
unk1);
316 IUnknown_QueryInterface(iface2, &
IID_IUnknown, (
void**)&unk2);
317 IUnknown_Release(unk2);
322#define EXPECT_UPDATEUI 1
323#define EXPECT_SETTITLE 2
327 BOOL *
b = &called_Exec_SETTITLE;
333 b = &called_UpdateUI;
353#define test_GetCurMoniker(u,m,v,t) _test_GetCurMoniker(__LINE__,u,m,v,t)
366 hres = IUnknown_QueryInterface(unk, &IID_IPersistMoniker, (
void**)&permon);
367 ok(
hres ==
S_OK,
"QueryInterface(IID_IPersistMoniker) failed: %08x\n",
hres);
371 hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument2, (
void**)&doc);
372 ok(
hres ==
S_OK,
"QueryInterface(IID_IHTMLDocument2) failed: %08x\n",
hres);
378 hres = IPersistMoniker_GetCurMoniker(permon, &mon);
379 IPersistMoniker_Release(permon);
383 BOOL exb = expect_GetDisplayName;
384 BOOL clb = called_GetDisplayName;
387 ok_(__FILE__,
line)(mon == exmon,
"mon(%p) != exmon(%p)\n", mon, exmon);
395 expect_GetDisplayName = exb;
396 called_GetDisplayName = clb;
421 "GetCurrentMoniker failed: %08x, expected E_UNEXPECTED\n",
hres);
427 IHTMLDocument2_Release(doc);
428 if(mon && mon != (
void*)0xdeadbeef)
429 IMoniker_Release(mon);
432#define test_current_url(a,b) _test_current_url(__LINE__,a,b)
439 hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument2, (
void**)&doc);
440 ok_(__FILE__,
line)(
hres ==
S_OK,
"QueryInterface(IID_IHTMLDocument2) failed: %08x\n",
hres);
442 hres = IHTMLDocument2_get_URL(doc, &
url);
447 IHTMLDocument2_Release(doc);
450DEFINE_GUID(IID_External_unk,0x30510406,0x98B5,0x11CF,0xBB,0x82,0x00,0xAA,0x00,0xBD,0xCE,0x0B);
485 ok(0,
"unexpected call\n");
492 ok(0,
"unexpected call\n");
499 ok(0,
"unexpected call\n");
505 EXCEPINFO *pExcepInfo,
UINT *puArgErr)
507 ok(0,
"unexpected call\n");
552 static const WCHAR wszTextCss[] = {
't',
'e',
'x',
't',
'/',
'c',
's',
's',0};
557 ok(pOIProtSink !=
NULL,
"pOIProtSink == NULL\n");
558 ok(pOIBindInfo !=
NULL,
"pOIBindInfo == NULL\n");
559 ok(!grfPI,
"grfPI = %x\n", grfPI);
562 memset(&bindinfo, 0,
sizeof(bindinfo));
563 bindinfo.cbSize =
sizeof(bindinfo);
564 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &
bindf, &bindinfo);
567 ok(
bindf == (BINDF_FROMURLMON|BINDF_PULLDATA|BINDF_NEEDFILE|BINDF_ASYNCSTORAGE|BINDF_ASYNCHRONOUS),
568 "bindf = %x\n",
bindf);
570 ok(
bindf == (BINDF_FROMURLMON|BINDF_FORMS_SUBMIT|BINDF_PRAGMA_NO_CACHE|BINDF_HYPERLINK
571 |BINDF_PULLDATA|BINDF_NEEDFILE|BINDF_GETNEWESTVERSION|BINDF_ASYNCSTORAGE|BINDF_ASYNCHRONOUS),
572 "bindf = %x\n",
bindf);
574 ok(bindinfo.cbSize ==
sizeof(bindinfo),
"bindinfo.cbSize=%d\n", bindinfo.cbSize);
575 ok(bindinfo.szExtraInfo ==
NULL,
"bindinfo.szExtraInfo=%p\n", bindinfo.szExtraInfo);
577 ok(bindinfo.grfBindInfoF == 0,
"bindinfo.grfBinfInfoF=%08x\n", bindinfo.grfBindInfoF);
579 ok(bindinfo.dwBindVerb == BINDVERB_GET,
"bindinfo.dwBindVerb=%d\n", bindinfo.dwBindVerb);
580 ok(bindinfo.cbstgmedData == 0,
"bindinfo.cbstgmedData=%d\n", bindinfo.cbstgmedData);
581 ok(bindinfo.stgmedData.tymed == TYMED_NULL,
"bindinfo.stgmedData.tymed=%d\n", bindinfo.stgmedData.tymed);
583 ok(bindinfo.dwBindVerb == BINDVERB_POST,
"bindinfo.dwBindVerb=%d\n", bindinfo.dwBindVerb);
584 ok(bindinfo.cbstgmedData == 8,
"bindinfo.cbstgmedData=%d\n", bindinfo.cbstgmedData);
585 ok(bindinfo.stgmedData.tymed == TYMED_HGLOBAL,
"bindinfo.stgmedData.tymed=%d\n", bindinfo.stgmedData.tymed);
586 ok(!
memcmp(
U(bindinfo.stgmedData).hGlobal,
"cmd=TEST", 8),
"unexpected hGlobal\n");
588 ok(bindinfo.szCustomVerb == 0,
"bindinfo.szCustomVerb=%p\n", bindinfo.szCustomVerb);
589 ok(bindinfo.dwOptions == 0x80000 ||
590 bindinfo.dwOptions == 0x4080000,
591 "bindinfo.dwOptions=%x\n", bindinfo.dwOptions);
592 ok(bindinfo.dwOptionsFlags == 0,
"bindinfo.dwOptionsFlags=%d\n", bindinfo.dwOptionsFlags);
596 ok(bindinfo.pUnk ==
NULL,
"bindinfo.pUnk=%p\n", bindinfo.pUnk);
597 ok(bindinfo.dwReserved == 0,
"bindinfo.dwReserved=%d\n", bindinfo.dwReserved);
599 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
600 BINDSTATUS_CACHEFILENAMEAVAILABLE, &
empty_str);
601 ok(
hres ==
S_OK,
"ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n",
hres);
604 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
605 BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextCss);
607 "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n",
hres);
610 hres = IInternetProtocolSink_ReportData(pOIProtSink,
611 BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION, 13, 13);
614 hres = IInternetProtocolSink_ReportResult(pOIProtSink,
S_OK, 0,
NULL);
621 PROTOCOLDATA *pProtocolData)
623 ok(0,
"unexpected call\n");
630 ok(0,
"unexpected call\n");
642 ok(0,
"unexpected call\n");
648 ok(0,
"unexpected call\n");
657 ok(pv !=
NULL,
"pv == NULL\n");
659 ok(pcbRead !=
NULL,
"pcbRead == NULL\n");
660 ok(!*pcbRead || *pcbRead==
sizeof(
css_data)-1,
"*pcbRead=%d\n", *pcbRead);
674 ok(0,
"unexpected call\n");
711 ok(0,
"unexpected call\n");
740 ok(0,
"unexpected call\n");
756 ok(0,
"unexpected call\n");
773 ok(0,
"unexpected call\n");
780 ok(0,
"unexpected call\n");
791 ok(grfHLNF == 0,
"grfHLNF=%d, expected 0\n", grfHLNF);
792 ok(pbc !=
NULL,
"pbc == NULL\n");
793 ok(pibsc !=
NULL,
"pubsc == NULL\n");
794 ok(pihlNavigate !=
NULL,
"puhlNavigate == NULL\n");
801 DWORD site_data = 0xdeadbeef;
803 hres = IHlink_GetTargetFrameName(pihlNavigate, &frame_name);
805 ok(frame_name ==
NULL,
"frame_name = %p\n", frame_name);
807 hres = IHlink_GetMonikerReference(pihlNavigate, 1, &mon, &
location);
810 ok(mon !=
NULL,
"mon == NULL\n");
816 IMoniker_Release(mon);
818 hres = IHlink_GetHlinkSite(pihlNavigate, &
site, &site_data);
821 ok(site_data == 0xdeadbeef,
"site_data = %x\n", site_data);
830 ok(0,
"unexpected call\n");
837 ok(0,
"unexpected call\n");
878 DWORD dwUserActionTime)
886 ok(!fReplace,
"fReplace = %x\n", fReplace);
888 ok(!dwUserActionTime,
"dwUserActionime = %d\n", dwUserActionTime);
910 ok(0,
"unexpected call\n");
936 ? OLECMDF_ENABLED : 0));
973 ok(0,
"unexpected id %d\n", dispID);
979 ok(0,
"unexpected call\n");
1019 ok(pv !=
NULL,
"pv == NULL\n");
1021 ok(pcbRead !=
NULL,
"pcbRead == NULL\n");
1022 ok(!*pcbRead,
"*pcbRead = %d\n", *pcbRead);
1035 ok(0,
"unexpected call\n");
1042 ok(0,
"unexpected call\n");
1048 ok(0,
"unexpected call\n");
1055 ok(0,
"unexpected call\n");
1061 ok(0,
"unexpected call\n");
1067 ok(0,
"unexpected call\n");
1074 ok(0,
"unexpected call\n");
1081 ok(0,
"unexpected call\n");
1088 ok(0,
"unexpected call\n");
1094 ok(0,
"unexpected call\n");
1164 ok(*pcbBuf ==
sizeof(
DWORD),
"*pcbBuf = %d\n", *pcbBuf);
1165 ok(pdwFlags ==
NULL,
"*pdwFlags != NULL\n");
1183DEFINE_GUID(IID_unk_binding, 0xf3d8f080,0xa5eb,0x476f,0x9d,0x19,0xa5,0xef,0x24,0xe5,0xc2,0xe6);
1227 ok(0,
"unexpected call\n");
1233 ok(0,
"unexpected call\n");
1239 ok(0,
"unexpected call\n");
1245 ok(0,
"unexpected call\n");
1270DEFINE_GUID(IID_IMoniker_unk,0xA158A630,0xED6F,0x45FB,0xB9,0x87,0xF6,0x86,0x76,0xF5,0x77,0x52);
1271DEFINE_GUID(IID_IMoniker_unk2, 0x79EAC9D3,0xBAF9,0x11CE,0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B);
1305 ok(0,
"unexpected call\n");
1311 ok(0,
"unexpected call\n");
1317 ok(0,
"unexpected call\n");
1323 ok(0,
"unexpected call\n");
1328 REFIID riidResult,
void **ppvResult)
1330 ok(0,
"unexpected call\n");
1341 hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (
void**)&serv_prov);
1342 ok(
hres ==
S_OK,
"Could not get IServiceProvider: %08x\n",
hres);
1344 hres = IServiceProvider_QueryService(serv_prov, &IID_IWindowForBindingUI, &IID_IWindowForBindingUI,
1345 (
void**)&binding_ui);
1346 ok(
hres ==
S_OK,
"Could not get IWindowForBindingUI: %08x\n",
hres);
1348 hres = IWindowForBindingUI_GetWindow(binding_ui, &IID_IHttpSecurity, &binding_hwnd);
1349 ok(
hres ==
S_OK,
"GetWindow(IID_IHttpSecurity) failed: %08x\n",
hres);
1351 ok(binding_hwnd ==
doc_hwnd,
"binding_hwnd != doc_hwnd\n");
1355 hres = IWindowForBindingUI_GetWindow(binding_ui, &IID_IAuthenticate, &binding_hwnd);
1356 ok(
hres ==
S_OK,
"GetWindow(IID_IHttpSecurity) failed: %08x\n",
hres);
1358 ok(binding_hwnd ==
doc_hwnd,
"binding_hwnd != doc_hwnd\n");
1362 hres = IWindowForBindingUI_GetWindow(binding_ui, &IID_IWindowForBindingUI, &binding_hwnd);
1363 ok(
hres ==
S_OK,
"GetWindow(IID_IHttpSecurity) failed: %08x\n",
hres);
1365 ok(binding_hwnd ==
doc_hwnd,
"binding_hwnd != doc_hwnd\n");
1369 IWindowForBindingUI_Release(binding_ui);
1370 IServiceProvider_Release(serv_prov);
1375 FORMATETC formatetc = {0xc02d,
NULL, 1, -1, TYMED_ISTREAM};
1376 STGMEDIUM stgmedium;
1379 static const WCHAR wszTextHtml[] = {
't',
'e',
'x',
't',
'/',
'h',
't',
'm',
'l',0};
1384 hres = IBindStatusCallback_OnProgress(
callback, 0, 0, BINDSTATUS_MIMETYPEAVAILABLE,
1386 ok(
hres ==
S_OK,
"OnProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n",
hres);
1390 BINDSTATUS_BEGINDOWNLOADDATA,
doc_url);
1391 ok(
hres ==
S_OK,
"OnProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n",
hres);
1398 stgmedium.tymed = TYMED_ISTREAM;
1402 BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION,
1403 sizeof(
html_page)-1, &formatetc, &stgmedium);
1408 BINDSTATUS_ENDDOWNLOADDATA,
NULL);
1409 ok(
hres ==
S_OK,
"OnProgress(BINDSTATUS_ENDDOWNLOADDATA) failed: %08x\n",
hres);
1416 IBindStatusCallback_Release(
callback);
1427 static OLECHAR BSCBHolder[] = {
'_',
'B',
'S',
'C',
'B',
'_',
'H',
'o',
'l',
'd',
'e',
'r',
'_',0 };
1433 ok(pbc !=
NULL,
"pbc == NULL\n");
1434 ok(pmkToLeft ==
NULL,
"pmkToLeft=%p\n", pmkToLeft);
1443 memset(&bindinfo, 0xf0,
sizeof(bindinfo));
1444 bindinfo.cbSize =
sizeof(bindinfo);
1448 ok((
bindf & ~BINDF_HYPERLINK ) == (BINDF_PULLDATA|BINDF_ASYNCSTORAGE|BINDF_ASYNCHRONOUS),
"bindf = %08x\n",
bindf);
1449 ok(bindinfo.cbSize ==
sizeof(bindinfo),
"bindinfo.cbSize=%d\n", bindinfo.cbSize);
1450 ok(bindinfo.szExtraInfo ==
NULL,
"bindinfo.szExtraInfo=%p\n", bindinfo.szExtraInfo);
1452 ok(bindinfo.grfBindInfoF == 0,
"bindinfo.grfBinfInfoF=%08x\n", bindinfo.grfBindInfoF);
1453 ok(bindinfo.dwBindVerb == 0,
"bindinfo.dwBindVerb=%d\n", bindinfo.dwBindVerb);
1454 ok(bindinfo.szCustomVerb == 0,
"bindinfo.szCustomVerb=%p\n", bindinfo.szCustomVerb);
1455 ok(bindinfo.cbstgmedData == 0,
"bindinfo.cbstgmedData=%d\n", bindinfo.cbstgmedData);
1456 ok(bindinfo.dwOptions == 0x80000 || bindinfo.dwOptions == 0x4080000,
1457 "bindinfo.dwOptions=%x\n", bindinfo.dwOptions);
1458 ok(bindinfo.dwOptionsFlags == 0,
"bindinfo.dwOptionsFlags=%d\n", bindinfo.dwOptionsFlags);
1462 ok(bindinfo.pUnk ==
NULL,
"bindinfo.pUnk=%p\n", bindinfo.pUnk);
1463 ok(bindinfo.dwReserved == 0,
"bindinfo.dwReserved=%d\n", bindinfo.dwReserved);
1470 return MK_S_ASYNCHRONOUS;
1480 ok(0,
"unexpected call\n");
1487 ok(0,
"unexpected call\n");
1493 ok(0,
"unexpected call\n");
1499 ok(0,
"unexpected call\n");
1505 ok(0,
"unexpected call\n");
1512 ok(0,
"unexpected call\n");
1519 ok(0,
"unexpected call\n");
1525 ok(0,
"unexpected call\n");
1532 ok(0,
"unexpected call\n");
1539 ok(0,
"unexpected call\n");
1549 ok(pmkToLeft ==
NULL,
"pmkToLeft=%p\n", pmkToLeft);
1550 ok(ppszDisplayName !=
NULL,
"ppszDisplayName == NULL\n");
1561 ok(0,
"unexpected call\n");
1617 ok(0,
"unexpected call\n");
1624 ok(0,
"unexpected call\n");
1663 ok(0,
"unexpected call\n");
1670 ok(0,
"unexpected call\n");
1677 ok(ppContainer !=
NULL,
"ppContainer = NULL\n");
1684 ok(0,
"unexpected call\n");
1690 ok(0,
"unexpected call\n");
1696 ok(0,
"unexpected call\n");
1716 static const GUID undocumented_frame_iid = {0xfbece6c9,0x48d7,0x4a37,{0x8f,0xe3,0x6a,0xd4,0x27,0x2f,0xdd,0xac}};
1743 ok(0,
"unexpected call\n");
1749 ok(0,
"unexpected call\n");
1754 LPCBORDERWIDTHS pborderwidths)
1756 ok(0,
"unexpected call\n");
1761 LPCBORDERWIDTHS pborderwidths)
1770 static const WCHAR wszHTML_Document[] =
1771 {
'H',
'T',
'M',
'L',
' ',
'D',
'o',
'c',
'u',
'm',
'e',
'n',
't',0};
1776 ok(pActiveObject !=
NULL,
"pActiveObject = NULL\n");
1781 ok(pActiveObject ==
NULL,
"pActiveObject=%p, expected NULL\n", pActiveObject);
1782 ok(pszObjName ==
NULL,
"pszObjName=%p, expected NULL\n", pszObjName);
1791 static const WCHAR wszHTML_Document[] =
1792 {
'H',
'T',
'M',
'L',
' ',
'D',
'o',
'c',
'u',
'm',
'e',
'n',
't',0};
1802 ok(pActiveObject ==
NULL,
"pActiveObject=%p, expected NULL\n", pActiveObject);
1803 ok(pszObjName ==
NULL,
"pszObjName=%p, expected NULL\n", pszObjName);
1810 LPOLEMENUGROUPWIDTHS lpMenuWidths)
1812 ok(0,
"unexpected call\n");
1817 HOLEMENU holemenu,
HWND hwndActiveObject)
1819 ok(0,
"unexpected call\n");
1825 ok(0,
"unexpected call\n");
1834 ok(pszStatusText ==
NULL,
"pszStatusText=%p, expected NULL\n", pszStatusText);
1849 ok(0,
"unexpected call\n");
1910 ok(phwnd !=
NULL,
"phwnd = NULL\n");
1917 IOleObject_Release(ole_obj);
1928 ok(0,
"unexpected call\n");
1957 LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
1959 static const RECT rect = {0,0,500,500};
1963 ok(ppFrame !=
NULL,
"ppFrame = NULL\n");
1966 ok(ppDoc !=
NULL,
"ppDoc = NULL\n");
1969 ok(lprcPosRect !=
NULL,
"lprcPosRect = NULL\n");
1972 ok(lprcClipRect !=
NULL,
"lprcClipRect = NULL\n");
1975 ok(lpFrameInfo !=
NULL,
"lpFrameInfo = NULL\n");
1977 ok(lpFrameInfo->cb ==
sizeof(*lpFrameInfo),
"lpFrameInfo->cb = %u, expected %u\n", lpFrameInfo->cb, (
unsigned)
sizeof(*lpFrameInfo));
1978 lpFrameInfo->fMDIApp =
FALSE;
1980 lpFrameInfo->haccel =
NULL;
1981 lpFrameInfo->cAccelEntries = 0;
1990 ok(0,
"unexpected call\n");
1998 ok(!fUndoable,
"fUndoable = TRUE\n");
2013 ok(0,
"unexpected call\n");
2020 ok(0,
"unexpected call\n");
2027 ok(0,
"unexpected call\n");
2036 ok(pfNoRedraw !=
NULL,
"pfNoRedraw == NULL\n");
2037 ok(!*pfNoRedraw,
"*pfNoRedraw == TRUE\n");
2048 ok(fNoRedraw,
"fNoRedraw == FALSE\n");
2063 ok(0,
"unexpected call\n");
2070 ok(0,
"unexpected call\n");
2077 ok(0,
"unexpected call\n");
2084 ok(0,
"unexpected call\n");
2091 ok(0,
"unexpected call\n");
2099 ok(0,
"unexpected call\n");
2106 ok(0,
"unexpected call\n");
2113 ok(0,
"unexpected call\n");
2120 ok(0,
"unexpected call\n");
2128 ok(0,
"unexpected call\n");
2135 ok(0,
"unexpected call\n");
2143 ok(0,
"unexpected call\n");
2211 ok(pViewToActivate !=
NULL,
"pViewToActivate = NULL\n");
2213 hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (
void**)&document);
2226 hres = IOleDocumentView_GetInPlaceSite(
view, &inplacesite);
2234 hres = IOleDocumentView_GetInPlaceSite(
view, &inplacesite);
2240 ok(
hres ==
S_OK,
"Could not get IOleInPlaceActiveObject: %08x\n",
hres);
2244 hres = IOleInPlaceActiveObject_GetWindow(activeobj, &
hwnd);
2283 hres = IOleInPlaceActiveObject_GetWindow(activeobj, &
doc_hwnd);
2294 hres = IOleInPlaceActiveObject_GetWindow(activeobj, &tmp_hwnd);
2335 hres = IOleInPlaceActiveObject_GetWindow(activeobj, &
doc_hwnd);
2346 IOleInPlaceActiveObject_Release(activeobj);
2349 IOleDocument_Release(document);
2381 ok(0,
"unexpected call\n");
2387 ok(0,
"unexpected call\n");
2393 ok(0,
"unexpected call\n");
2400 ok(0,
"unexpected call\n");
2407 ok(0,
"unexpected call\n");
2422 ok(0,
"unexpected call\n");
2461 ok(0,
"unexpected call\n");
2471 ok(pInfo !=
NULL,
"pInfo=NULL\n");
2473 ok(pInfo->cbSize ==
sizeof(DOCHOSTUIINFO),
"pInfo->cbSize=%u\n", pInfo->cbSize);
2474 ok(!pInfo->dwFlags,
"pInfo->dwFlags=%08x, expected 0\n", pInfo->dwFlags);
2478 ok(!pInfo->dwDoubleClick,
"pInfo->dwDoubleClick=%08x, expected 0\n", pInfo->dwDoubleClick);
2479 ok(!pInfo->pchHostCss,
"pInfo->pchHostCss=%p, expected NULL\n", pInfo->pchHostCss);
2480 ok(!pInfo->pchHostNS,
"pInfo->pchhostNS=%p, expected NULL\n", pInfo->pchHostNS);
2496 ok(pActiveObject !=
NULL,
"pActiveObject = NULL\n");
2497 ok(pCommandTarget !=
NULL,
"pCommandTarget = NULL\n");
2502 ok(pDoc ==
NULL,
"pDoc=%p, expected NULL\n", pDoc);
2533 ok(0,
"unexpected call\n");
2550 ok(0,
"unexpected call\n");
2555 const GUID *pguidCmdGroup,
DWORD nCmdID)
2557 ok(0,
"unexpected call\n");
2567 ok(pchKey !=
NULL,
"pchKey = NULL\n");
2568 ok(!
dw,
"dw=%d, expected 0\n",
dw);
2570 ok(!*pchKey,
"*pchKey=%p, expected NULL\n", *pchKey);
2596 ok(!dwTranslate,
"dwTranslate = %x\n", dwTranslate);
2601 ok(ppchURLOut !=
NULL,
"ppchURLOut == NULL\n");
2602 ok(!*ppchURLOut,
"*ppchURLOut = %p\n", *ppchURLOut);
2616 ok(0,
"unexpected call\n");
2626 ok(pchKey !=
NULL,
"pchKey = NULL\n");
2628 ok(!*pchKey,
"*pchKey=%p, expected NULL\n", *pchKey);
2629 ok(!
dw,
"dw=%d, expected 0\n",
dw);
2717 ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
2719 ok(!pguidCmdGroup,
"pguidCmdGroup != MULL\n");
2720 ok(cCmds == 1,
"cCmds=%d, expected 1\n", cCmds);
2721 ok(!pCmdText,
"pCmdText != NULL\n");
2723 switch(prgCmds[0].cmdID) {
2724 case OLECMDID_SETPROGRESSTEXT:
2726 prgCmds[0].cmdf = OLECMDF_ENABLED;
2730 prgCmds[0].cmdf = 0;
2734 prgCmds[0].cmdf = 0;
2737 ok(0,
"unexpected command %d\n", prgCmds[0].cmdID);
2750 hres = IUnknown_QueryInterface(unk, &IID_IPersistHistory, (
void**)&per_hist);
2751 ok(
hres ==
S_OK,
"Could not get IPersistHistory iface: %08x\n",
hres);
2756 hres = IPersistHistory_SaveHistory(per_hist,
stream);
2758 IPersistHistory_Release(per_hist);
2772 if(!pguidCmdGroup) {
2776 case OLECMDID_SETPROGRESSMAX:
2778 ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER,
"nCmdexecopts=%08x\n", nCmdexecopt);
2779 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2781 ok(
V_VT(pvaIn) ==
VT_I4,
"V_VT(pvaIn)=%d, expected VT_I4\n",
V_VT(pvaIn));
2783 ok(
V_I4(pvaIn) == 0,
"V_I4(pvaIn)=%d, expected 0\n",
V_I4(pvaIn));
2785 ok(pvaOut ==
NULL,
"pvaOut=%p, expected NULL\n", pvaOut);
2787 case OLECMDID_SETPROGRESSPOS:
2789 ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER,
"nCmdexecopts=%08x\n", nCmdexecopt);
2790 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2792 ok(
V_VT(pvaIn) ==
VT_I4,
"V_VT(pvaIn)=%d, expected VT_I4\n",
V_VT(pvaIn));
2794 ok(
V_I4(pvaIn) == 0,
"V_I4(pvaIn)=%d, expected 0\n",
V_I4(pvaIn));
2796 ok(pvaOut ==
NULL,
"pvaOut=%p, expected NULL\n", pvaOut);
2798 case OLECMDID_HTTPEQUIV_DONE:
2800 ok(nCmdexecopt == 0,
"nCmdexecopts=%08x\n", nCmdexecopt);
2801 ok(pvaOut ==
NULL,
"pvaOut=%p\n", pvaOut);
2802 ok(pvaIn ==
NULL,
"pvaIn=%p\n", pvaIn);
2807 case OLECMDID_SETDOWNLOADSTATE:
2808 ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER,
"nCmdexecopts=%08x\n", nCmdexecopt);
2809 ok(pvaOut ==
NULL,
"pvaOut=%p\n", pvaOut);
2810 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2813 switch(
V_I4(pvaIn)) {
2824 ok(0,
"unexpevted V_I4(pvaIn)=%d\n",
V_I4(pvaIn));
2828 case OLECMDID_UPDATECOMMANDS:
2830 ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER,
"nCmdexecopts=%08x\n", nCmdexecopt);
2831 ok(pvaIn ==
NULL,
"pvaIn=%p\n", pvaIn);
2832 ok(pvaOut ==
NULL,
"pvaOut=%p\n", pvaOut);
2834 case OLECMDID_SETTITLE:
2836 ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER,
"nCmdexecopts=%08x\n", nCmdexecopt);
2837 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2838 ok(pvaOut ==
NULL,
"pvaOut=%p\n", pvaOut);
2842 case OLECMDID_HTTPEQUIV:
2844 ok(!nCmdexecopt,
"nCmdexecopts=%08x\n", nCmdexecopt);
2845 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2846 ok(pvaOut ==
NULL,
"pvaOut=%p\n", pvaOut);
2851 case OLECMDID_UPDATETRAVELENTRY_DATARECOVERY:
2852 case OLECMDID_PAGEAVAILABLE:
2856 ok(0,
"unexpected command %d\n", nCmdID);
2861 if(
IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) {
2862 ok(nCmdexecopt == 0,
"nCmdexecopts=%08x\n", nCmdexecopt);
2885 ok(pvaOut ==
NULL,
"pvaOut=%p, expected NULL\n", pvaOut);
2886 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2888 ok(
V_VT(pvaIn) ==
VT_I4,
"V_VT(pvaIn)=%d, expected VT_I4\n",
V_VT(pvaIn));
2889 ok(
V_I4(pvaIn) == 0,
"V_I4(pvaIn)=%d, expected 0\n",
V_I4(pvaIn));
2895 ok(!pvaIn,
"pvaIn != NULL\n");
2896 ok(!pvaOut,
"pvaOut != NULL\n");
2904 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2907 ok(pvaOut !=
NULL,
"pvaOut == NULL\n");
2910 hres = IUnknown_QueryInterface(
V_UNKNOWN(pvaIn), &IID_IHTMLPrivateWindow, (
void**)&priv_window);
2911 ok(
hres ==
S_OK,
"Could not get IHTMLPrivateWindow: %08x\n",
hres);
2913 IHTMLPrivateWindow_Release(priv_window);
2921 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2925 ok(pvaOut !=
NULL,
"pvaOut == NULL\n");
2927 ok(
V_BOOL(pvaOut) == VARIANT_TRUE,
"V_BOOL(pvaOut) = %x\n",
V_BOOL(pvaOut));
2935 ok(pvaIn ==
NULL,
"pvaIn != NULL\n");
2936 ok(pvaOut !=
NULL,
"pvaOut == NULL\n");
2946 ok(pvaIn ==
NULL,
"pvaIn != NULL\n");
2947 ok(pvaOut ==
NULL,
"pvaOut != NULL\n");
2955 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
2956 ok(pvaOut ==
NULL,
"pvaOut != NULL\n");
2963 ok(!pvaIn,
"pvaIn != NULL\n");
2964 ok(!pvaOut,
"pvaOut != NULL\n");
2971 ok(pvaIn ==
NULL,
"pvaIn != NULL\n");
2972 ok(pvaOut ==
NULL,
"pvaOut != NULL\n");
2998 ok(0,
"unexpected command %d\n", nCmdID);
3005 ok(nCmdexecopt == 0,
"nCmdexecopts=%08x\n", nCmdexecopt);
3010 ok(pvaIn ==
NULL,
"pvaIn != NULL\n");
3011 ok(pvaOut ==
NULL,
"pvaOut != NULL\n");
3014 ok(0,
"unexpected command %d\n", nCmdID);
3018 if(
IsEqualGUID(&CGID_DocHostCmdPriv, pguidCmdGroup)) {
3030 ok(pvaOut ==
NULL,
"pvaOut != NULL\n");
3041 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
3042 ok(pvaOut !=
NULL ||
broken(!pvaOut),
"pvaOut != NULL\n");
3049 ok(dim == 1,
"dim = %d\n", dim);
3052 ok(ind == 0,
"Lower bound = %d\n", ind);
3055 ok(ind == 7 || ind == 8 ||
broken(ind == 5),
"Upper bound = %d\n", ind);
3078 ok(!
V_BOOL(&
var),
"Unknown value is incorrect\n");
3083 ok(!
V_BOOL(&
var),
"Unknown value is incorrect\n");
3093 ok(nCmdexecopt == 0,
"nCmdexecopts=%08x\n", nCmdexecopt);
3098 ok(pvaIn !=
NULL,
"pvaIn == NULL\n");
3100 ok(!
V_I4(pvaIn),
"V_I4(pvaIn) = %d\n",
V_I4(pvaIn));
3101 ok(!pvaOut,
"pvaOut != NULL\n");
3110 ok(pvaIn ==
NULL,
"pvaIn != NULL\n");
3111 ok(pvaOut !=
NULL,
"pvaOut == NULL\n");
3116 ok(0,
"unexpected cmd %d of CGID_Explorer\n", nCmdID);
3121 if(
IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) {
3125 case OLECMDID_PAGEACTIONBLOCKED:
3127 ok(pvaIn ==
NULL,
"pvaIn != NULL\n");
3128 ok(pvaOut ==
NULL,
"pvaOut != NULL\n");
3130 case OLECMDID_SHOWSCRIPTERROR:
3137 ok(0,
"unexpected command %d\n", nCmdID);
3163 EXCEPINFO *pExcepInfo,
UINT *puArgErr)
3169 ok(pDispParams !=
NULL,
"pDispParams == NULL\n");
3170 ok(pExcepInfo ==
NULL,
"pExcepInfo=%p, expected NULL\n", pExcepInfo);
3171 ok(puArgErr !=
NULL,
"puArgErr == NULL\n");
3172 ok(
V_VT(pVarResult) == 0,
"V_VT(pVarResult)=%d, expected 0\n",
V_VT(pVarResult));
3178 switch(dispIdMember) {
3182 V_BOOL(pVarResult) = VARIANT_TRUE;
3193 V_BOOL(pVarResult) = VARIANT_FALSE;
3203 ok(0,
"unexpected dispid %d\n", dispIdMember);
3226 ok(0,
"Unexpected call\n");
3232 EXCEPINFO *pExcepInfo,
UINT *puArgErr)
3235 IHTMLDocument2 *doc;
3242 ok(pDispParams !=
NULL,
"pDispParams == NULL\n");
3243 ok(pExcepInfo !=
NULL,
"pExcepInfo == NULL\n");
3244 ok(puArgErr !=
NULL,
"puArgErr == NULL\n");
3245 ok(
V_VT(pVarResult) == 0,
"V_VT(pVarResult) = %d\n",
V_VT(pVarResult));
3248 hres = IUnknown_QueryInterface(
doc_unk, &IID_IHTMLDocument2, (
void**)&doc);
3249 ok(
hres ==
S_OK,
"QueryInterface(IID_IHTMLDocument2) failed: %08x\n",
hres);
3251 switch(dispIdMember) {
3253 hres = IHTMLDocument2_get_readyState(doc, &
state);
3281 ok(0,
"Unexpected DISPID: %d\n", dispIdMember);
3284 IHTMLDocument2_Release(doc);
3302 static const IID IID_IIETravelLog2 = {0xb67cefd2,0xe3f1,0x478a,{0x9b,0xfa,0xd8,0x93,0x70,0x37,0x5e,0x94}};
3303 static const IID IID_unk_travellog = {0x6afc8b7f,0xbc17,0x4a95,{0x90,0x2f,0x6f,0x5c,0xb5,0x54,0xc3,0xd8}};
3304 static const IID IID_unk_travellog2 = {0xf6d02767,0x9c80,0x428d,{0xb9,0x74,0x3f,0x17,0x29,0x45,0x3f,0xdb}};
3331 ok(0,
"unexpected call\n");
3337 ok(0,
"unexpected call\n");
3343 ok(0,
"unexpected call\n");
3349 ok(0,
"unexpected call\n");
3355 ok(0,
"unexpected call\n");
3361 ok(0,
"unexpected call\n");
3368 ok(0,
"unexpected call\n");
3375 ok(0,
"unexpected call\n");
3381 ok(0,
"unexpected call\n");
3396 ok(0,
"unexpected call\n");
3444 ok(!pDispatch,
"pDispatch = %p\n", pDispatch);
3447 ok(!lpszFrameName,
"lpszFrameName = %s\n",
wine_dbgstr_w(lpszFrameName));
3449 ok(!pPostData,
"pPostData = %p\n", pPostData);
3450 ok(!cbPostData,
"cbPostData = %d\n", cbPostData);
3451 ok(!lpszHeaders || !
strcmp_wa(lpszHeaders,
"Referer: http://test.winehq.org/tests/winehq_snapshot/\r\n"),
3454 ok(cbPostData == 9,
"cbPostData = %d\n", cbPostData);
3455 ok(!
memcmp(pPostData,
"cmd=TEST", cbPostData),
"pPostData = %p\n", pPostData);
3456 ok(
wstr_contains(lpszHeaders,
"Content-Type: application/x-www-form-urlencoded\r\n"),
3460 ok(fPlayNavSound,
"fPlayNavSound = %x\n", fPlayNavSound);
3461 ok(pfCancel !=
NULL,
"pfCancel = NULL\n");
3462 ok(!*pfCancel,
"*pfCancel = %x\n", *pfCancel);
3480 ok(pHTMLWindow2 !=
NULL,
"pHTMLWindow2 = NULL\n");
3488 ok(0,
"unexpected call\n");
3495 ok(0,
"unexpected call\n");
3506 ok(pHTMLWindow !=
NULL,
"pHTMLWindow == NULL\n");
3516 ok(0,
"unexpected call\n");
3522 BSTR *pbstrPendingUrl)
3531 IHTMLElement *pHTMLElement)