Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8a31ad6b
Commit
8a31ad6b
authored
Aug 01, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Aug 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.devices.enumeration/tests: Add IDeviceInformationStatics::CreateWatcherAqsFilter() tests.
parent
586cc5ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
devices.c
dlls/windows.devices.enumeration/tests/devices.c
+41
-0
No files found.
dlls/windows.devices.enumeration/tests/devices.c
View file @
8a31ad6b
...
...
@@ -232,6 +232,47 @@ static void test_DeviceInformation( void )
goto
skip_device_statics
;
}
IDeviceInformationStatics_CreateWatcherAqsFilter
(
device_info_statics
,
NULL
,
&
device_watcher
);
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
check_interface
(
device_watcher
,
&
IID_IUnknown
,
TRUE
);
check_interface
(
device_watcher
,
&
IID_IInspectable
,
TRUE
);
check_interface
(
device_watcher
,
&
IID_IAgileObject
,
TRUE
);
check_interface
(
device_watcher
,
&
IID_IDeviceWatcher
,
TRUE
);
hr
=
IDeviceWatcher_add_Added
(
device_watcher
,
(
ITypedEventHandler_DeviceWatcher_DeviceInformation
*
)
&
added_handler
.
ITypedEventHandler_DeviceWatcher_IInspectable_iface
,
&
added_token
);
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
hr
=
IDeviceWatcher_add_Stopped
(
device_watcher
,
&
stopped_handler
.
ITypedEventHandler_DeviceWatcher_IInspectable_iface
,
&
stopped_token
);
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
hr
=
IDeviceWatcher_get_Status
(
device_watcher
,
&
status
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
todo_wine
ok
(
status
==
DeviceWatcherStatus_Created
,
"got status %u
\n
"
,
status
);
hr
=
IDeviceWatcher_Start
(
device_watcher
);
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
hr
=
IDeviceWatcher_get_Status
(
device_watcher
,
&
status
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
todo_wine
ok
(
status
==
DeviceWatcherStatus_Started
,
"got status %u
\n
"
,
status
);
ref
=
IDeviceWatcher_AddRef
(
device_watcher
);
ok
(
ref
==
2
,
"got ref %lu
\n
"
,
ref
);
hr
=
IDeviceWatcher_Stop
(
device_watcher
);
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
ok
(
!
WaitForSingleObject
(
stopped_handler
.
event
,
1000
),
"wait for stopped_handler.event failed
\n
"
);
hr
=
IDeviceWatcher_get_Status
(
device_watcher
,
&
status
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx
\n
"
,
hr
);
todo_wine
ok
(
status
==
DeviceWatcherStatus_Stopped
,
"got status %u
\n
"
,
status
);
ok
(
stopped_handler
.
invoked
,
"stopped_handler not invoked
\n
"
);
ok
(
stopped_handler
.
args
==
NULL
,
"stopped_handler not invoked
\n
"
);
IDeviceWatcher_Release
(
device_watcher
);
IDeviceInformationStatics_Release
(
device_info_statics
);
skip_device_statics:
IInspectable_Release
(
inspectable
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment