Commit 1e2ec943 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added test of callbacks called from document timer.

parent 86e224c1
......@@ -151,6 +151,35 @@ static HRESULT QueryInterface(REFIID riid, void **ppv);
static void test_readyState(IUnknown*);
static void test_MSHTML_QueryStatus(IUnknown*,DWORD);
#define EXPECT_UPDATEUI 1
#define EXPECT_SETTITLE 2
static void test_timer(DWORD flags)
{
BOOL *b = &called_Exec_SETTITLE;
MSG msg;
if(flags & EXPECT_UPDATEUI) {
SET_EXPECT(UpdateUI);
SET_EXPECT(Exec_UPDATECOMMANDS);
b = &called_UpdateUI;
}
if(flags & EXPECT_SETTITLE)
SET_EXPECT(Exec_SETTITLE);
while(!*b && GetMessage(&msg, hwnd, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
if(flags & EXPECT_UPDATEUI) {
CHECK_CALLED(UpdateUI);
CHECK_CALLED(Exec_UPDATECOMMANDS);
}
if(flags & EXPECT_SETTITLE)
CHECK_CALLED(Exec_SETTITLE);
}
static HRESULT WINAPI Protocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) {
......@@ -1493,6 +1522,8 @@ static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocum
}
}
test_timer(EXPECT_UPDATEUI | ((load_state == LD_LOADING) ? EXPECT_SETTITLE : 0));
if(activeobj)
IOleInPlaceActiveObject_Release(activeobj);
}
......@@ -2258,7 +2289,6 @@ static void test_download(BOOL verb_done, BOOL css_dwl)
SET_EXPECT(Exec_SETDOWNLOADSTATE_0);
SET_EXPECT(Exec_MSHTML_PARSECOMPLETE);
SET_EXPECT(Exec_HTTPEQUIV_DONE);
SET_EXPECT(Exec_SETTITLE);
expect_status_text = (LPWSTR)0xdeadbeef; /* TODO */
while(!called_Exec_HTTPEQUIV_DONE && GetMessage(&msg, hwnd, 0, 0)) {
......@@ -2299,7 +2329,6 @@ static void test_download(BOOL verb_done, BOOL css_dwl)
CHECK_CALLED(Exec_SETDOWNLOADSTATE_0);
CHECK_CALLED(Exec_MSHTML_PARSECOMPLETE);
CHECK_CALLED(Exec_HTTPEQUIV_DONE);
CHECK_CALLED(Exec_SETTITLE);
load_state = LD_COMPLETE;
......@@ -2568,6 +2597,8 @@ static void test_exec_editmode(IUnknown *unk)
CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
CHECK_CALLED(OnChanged_READYSTATE);
test_timer(EXPECT_UPDATEUI|EXPECT_SETTITLE);
IOleCommandTarget_Release(cmdtrg);
editmode = TRUE;
......@@ -3016,6 +3047,8 @@ static void test_StreamLoad(IUnknown *unk)
CHECK_CALLED(OnChanged_READYSTATE);
CHECK_CALLED(Read);
test_timer(EXPECT_SETTITLE);
IPersistStreamInit_Release(init);
}
......
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