Rémi Bernon (@rbernon) commented about dlls/windows.perception.stub/tests/perception.c:
- ok( IsWindow( window ), "CreateWindowW failed.\n" );
- hr = IHolographicSpaceInterop_CreateForWindow( holographic_space_interop, window, &IID_IAgileObject, (void **)&holographic_space );
- todo_wine
- ok( hr == S_OK, "got hr %#lx.\n", hr );
- DestroyWindow( window );
- if (SUCCEEDED( hr ))
- {
ref = IHolographicSpace_Release( holographic_space );ok( ref == 0, "got ref %ld.\n", ref );- }
- window = CreateWindowW( L"static", NULL, WS_VISIBLE, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, NULL, NULL );
- ok( IsWindow( window ), "CreateWindowW failed.\n" );
- hr = IHolographicSpaceInterop_CreateForWindow( holographic_space_interop, window, &IID_IHolographicSpace, (void **)&holographic_space );
- todo_wine
- ok( hr == S_OK, "got hr %#lx.\n", hr );
Why does it work now and failed above? If this is a timing issue you probably should try processing window messages after its creation. Creating visible windows many times is also the best way to get flaky tests, on Linux this will cause a lot of asynchronous requests to the window manager and races to get the foreground window. I think you should create the window once as soon as possible, make sure it's foreground (copy create_foreground_window from some other tests for instance), then use it for as long as possible.
Also, I'm not sure it's very useful to tests all the failure cases above with unsupported interfaces, you should try to make it succeed with the most obvious interface *then* test the available interfaces on the created object.