Commit 1435688b authored by Mohamad Al-Jaf's avatar Mohamad Al-Jaf Committed by Alexandre Julliard

windows.media.mediacontrol/tests: Add some ISystemMediaTransportControls properties tests.

parent 0471de64
......@@ -63,6 +63,7 @@ static void test_MediaControlStatics(void)
ISystemMediaTransportControls *media_control_statics = NULL;
IActivationFactory *factory;
HWND window = NULL;
BOOLEAN value;
HSTRING str;
HRESULT hr;
LONG ref;
......@@ -102,6 +103,49 @@ static void test_MediaControlStatics(void)
ok( hr == S_OK || broken(hr == 0x80070578) /* Win8 */, "got hr %#lx.\n", hr );
if (!media_control_statics) goto done;
hr = ISystemMediaTransportControls_put_PlaybackStatus( media_control_statics, -1 );
todo_wine ok( hr == E_INVALIDARG, "got hr %#lx.\n", hr );
hr = ISystemMediaTransportControls_put_PlaybackStatus( media_control_statics, 5 );
todo_wine ok( hr == E_INVALIDARG, "got hr %#lx.\n", hr );
hr = ISystemMediaTransportControls_put_PlaybackStatus( media_control_statics, MediaPlaybackStatus_Closed );
todo_wine ok( hr == S_OK || broken(hr == S_FALSE) /* Win10 1507,1607 */, "got hr %#lx.\n", hr );
hr = ISystemMediaTransportControls_put_IsPlayEnabled( media_control_statics, FALSE );
todo_wine ok( hr == S_OK || broken(hr == S_FALSE) /* Win10 1507,1607 */, "got hr %#lx.\n", hr );
hr = ISystemMediaTransportControls_put_IsPauseEnabled( media_control_statics, FALSE );
todo_wine ok( hr == S_OK || broken(hr == S_FALSE) /* Win10 1507,1607 */, "got hr %#lx.\n", hr );
hr = ISystemMediaTransportControls_put_IsPreviousEnabled( media_control_statics, FALSE );
todo_wine ok( hr == S_OK || broken(hr == S_FALSE) /* Win10 1507,1607 */, "got hr %#lx.\n", hr );
hr = ISystemMediaTransportControls_put_IsNextEnabled( media_control_statics, FALSE );
todo_wine ok( hr == S_OK || broken(hr == S_FALSE) /* Win10 1507,1607 */, "got hr %#lx.\n", hr );
hr = ISystemMediaTransportControls_put_IsEnabled( media_control_statics, FALSE );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
value = TRUE;
hr = ISystemMediaTransportControls_get_IsPlayEnabled( media_control_statics, &value );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( value == FALSE, "got value %d.\n", value );
value = TRUE;
hr = ISystemMediaTransportControls_get_IsPauseEnabled( media_control_statics, &value );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( value == FALSE, "got value %d.\n", value );
value = TRUE;
hr = ISystemMediaTransportControls_get_IsPreviousEnabled( media_control_statics, &value );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( value == FALSE, "got value %d.\n", value );
value = TRUE;
hr = ISystemMediaTransportControls_get_IsNextEnabled( media_control_statics, &value );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( value == FALSE, "got value %d.\n", value );
value = TRUE;
hr = ISystemMediaTransportControls_get_IsEnabled( media_control_statics, &value );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( value == FALSE, "got value %d.\n", value );
ref = ISystemMediaTransportControls_Release( media_control_statics );
ok( ref == 1 || broken(ref == 3) /* Win10 1507 */ || broken(ref == 2) /* Win10 1607 */, "got ref %ld.\n", ref );
done:
......
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