[PATCH 4/5] qedit: Implement IAMTimelineObj_SetTimelineType and add tests.
Alex Henrie
alexhenrie24 at gmail.com
Mon Apr 25 22:09:59 CDT 2016
Cc: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
dlls/qedit/tests/timeline.c | 9 +++++++++
dlls/qedit/timelineobj.c | 6 ++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/qedit/tests/timeline.c b/dlls/qedit/tests/timeline.c
index 56a8fd3..3f4f1d7 100644
--- a/dlls/qedit/tests/timeline.c
+++ b/dlls/qedit/tests/timeline.c
@@ -65,6 +65,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)
diff --git a/dlls/qedit/timelineobj.c b/dlls/qedit/timelineobj.c
index bbe7e0e..e96d920 100644
--- a/dlls/qedit/timelineobj.c
+++ b/dlls/qedit/timelineobj.c
@@ -240,9 +240,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)->(%04x)\n", This, type);
+ if (type != This->timeline_type) return E_INVALIDARG;
+ return S_OK;
}
static HRESULT WINAPI TimelineObj_GetUserID(IAMTimelineObj *iface, LONG *id)
--
2.8.0
More information about the wine-patches
mailing list