mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-27 19:17:06 +08:00
Make webrequest native handle test independent
Check the web session native handle only after starting the request, as the macOS URLSession backend creates the native session lazily. This avoids depending on prior tests having initialized shared process state.
This commit is contained in:
@@ -493,10 +493,10 @@ TEST_CASE_METHOD(RequestFixture,
|
||||
|
||||
Create("status/200");
|
||||
CHECK( request.IsOk() );
|
||||
CHECK( session.GetNativeHandle() );
|
||||
|
||||
// Note that the request must be started to have a valid native handle.
|
||||
request.Start();
|
||||
CHECK( session.GetNativeHandle() );
|
||||
CHECK( request.GetNativeHandle() );
|
||||
RunLoopWithTimeout();
|
||||
CHECK( request.GetState() == wxWebRequest::State_Completed );
|
||||
|
||||
Reference in New Issue
Block a user