mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
ceftests: Simplify completion for tests that don't just create browsers
Some test cases don't create browsers at all, or require additional signals such as request context destruction. To test: Run `ceftests --gtest_filter=URLRequestTest.*`
This commit is contained in:
@@ -957,7 +957,7 @@ class MultiQuerySingleFrameTestHandler : public SingleLoadTestHandler,
|
||||
AssertQueryCount(nullptr, nullptr, 0);
|
||||
} else if (cancel_type_ == CANCEL_BY_CLOSING_BROWSER) {
|
||||
// Change the expected behavior in the handler.
|
||||
SetSignalCompletionWhenAllBrowsersClose(false);
|
||||
SetSignalTestCompletionCount(1U);
|
||||
CloseBrowser(GetBrowser(), false);
|
||||
}
|
||||
}
|
||||
@@ -971,11 +971,12 @@ class MultiQuerySingleFrameTestHandler : public SingleLoadTestHandler,
|
||||
|
||||
DestroyTest();
|
||||
|
||||
if (!SignalCompletionWhenAllBrowsersClose()) {
|
||||
if (!AllowTestCompletionWhenAllBrowsersClose()) {
|
||||
// Complete asynchronously so the call stack has a chance to unwind.
|
||||
CefPostTask(TID_UI,
|
||||
base::BindOnce(
|
||||
&MultiQuerySingleFrameTestHandler::TestComplete, this));
|
||||
CefPostTask(
|
||||
TID_UI,
|
||||
base::BindOnce(
|
||||
&MultiQuerySingleFrameTestHandler::SignalTestCompletion, this));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user