Alex Henrie : qedit: Implement IAMTimelineObj_SetTimelineType and add tests.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 27 10:45:43 CDT 2016


Module: wine
Branch: master
Commit: bebc10c625c34b5292857f6f7881b8bcfd81a293
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bebc10c625c34b5292857f6f7881b8bcfd81a293

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Tue Apr 26 23:12:49 2016 -0600

qedit: Implement IAMTimelineObj_SetTimelineType and add tests.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/qedit/tests/timeline.c | 9 +++++++++
 dlls/qedit/timeline.c       | 6 ++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/dlls/qedit/tests/timeline.c b/dlls/qedit/tests/timeline.c
index ecb4223..ca00063 100644
--- a/dlls/qedit/tests/timeline.c
+++ b/dlls/qedit/tests/timeline.c
@@ -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)
diff --git a/dlls/qedit/timeline.c b/dlls/qedit/timeline.c
index 0ecb1b5..a2552d2 100644
--- a/dlls/qedit/timeline.c
+++ b/dlls/qedit/timeline.c
@@ -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)




More information about the wine-cvs mailing list