ceftests: Add support for scaling default test timeout values

This commit is contained in:
Marshall Greenblatt
2023-01-13 13:49:33 -05:00
parent 2b906c31b5
commit b065ca8cf4
10 changed files with 84 additions and 51 deletions

View File

@@ -373,8 +373,8 @@ class HttpTestRunner : public base::RefCountedThreadSafe<HttpTestRunner> {
void SetTestTimeout(int timeout_ms) {
EXPECT_UI_THREAD();
if (CefCommandLine::GetGlobalCommandLine()->HasSwitch(
"disable-test-timeout")) {
const auto timeout = GetConfiguredTestTimeout(timeout_ms);
if (!timeout) {
return;
}
@@ -382,8 +382,8 @@ class HttpTestRunner : public base::RefCountedThreadSafe<HttpTestRunner> {
// test runner can be destroyed before the timeout expires.
GetUIThreadHelper()->PostDelayedTask(
base::BindOnce(&HttpTestRunner::OnTestTimeout, base::Unretained(this),
timeout_ms),
timeout_ms);
*timeout),
*timeout);
}
void OnTestTimeout(int timeout_ms) {