mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
ceftests: Fix flaky URLRequestTest due to server response timing
In some cases the browser may be closed before the server response is sent.
This commit is contained in:
@@ -124,8 +124,10 @@ class ServerHandler : public CefServerHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
// No response should be sent yet.
|
||||
EXPECT_TRUE(server->IsValidConnection(connection_id));
|
||||
if (!server->IsValidConnection(connection_id)) {
|
||||
// This can occur if the connected browser has already closed.
|
||||
return;
|
||||
}
|
||||
|
||||
const int response_code = response->GetStatus();
|
||||
if (response_code <= 0) {
|
||||
|
Reference in New Issue
Block a user