qedit: Implement IAMTimelineObj_SetTimelineType and add tests.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Alex Henrie 2016-04-26 23:12:49 -06:00 committed by Alexandre Julliard
parent 41d0860d41
commit bebc10c625
2 changed files with 13 additions and 2 deletions

View File

@ -82,6 +82,15 @@ static void test_timeline(void)
hr = IAMTimelineObj_GetTimelineType(obj, &type);
ok(hr == S_OK, "GetTimelineType failed: %08x\n", hr);
ok(type == TIMELINE_MAJOR_TYPE_COMPOSITE, "Expected TIMELINE_MAJOR_TYPE_COMPOSITE got %d\n", type);
for (type = 0; type < 256; type++)
{
hr = IAMTimelineObj_SetTimelineType(obj, type);
if (type == TIMELINE_MAJOR_TYPE_COMPOSITE)
ok(hr == S_OK, "SetTimelineType failed: %08x\n", hr);
else
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08x\n", hr);
}
}
START_TEST(timeline)

View File

@ -602,9 +602,11 @@ static HRESULT WINAPI TimelineObj_GetTimelineType(IAMTimelineObj *iface, TIMELIN
static HRESULT WINAPI TimelineObj_SetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE type)
{
/* MSDN says that this function is "not supported" */
TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
FIXME("(%p)->(%d): not implemented!\n", This, type);
return E_NOTIMPL;
TRACE("(%p)->(%d)\n", This, type);
if (type != This->timeline_type) return E_INVALIDARG;
return S_OK;
}
static HRESULT WINAPI TimelineObj_GetUserID(IAMTimelineObj *iface, LONG *id)