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

@@ -6,6 +6,8 @@
#define CEF_TESTS_CEFTESTS_TEST_UTIL_H_
#pragma once
#include <optional>
#include "include/cef_process_message.h"
#include "include/cef_request.h"
#include "include/cef_request_context.h"
@@ -96,6 +98,10 @@ bool IsSameSiteBFCacheEnabled();
// Returns true if requests for |url| should be ignored by tests.
bool IgnoreURL(const std::string& url);
// Returns |timeout_ms| as scaled by the current configuration, or std::nullopt
// if timeouts are disabled.
std::optional<int> GetConfiguredTestTimeout(int timeout_ms);
// Return a RequestContext object matching the specified |mode|.
// |cache_path| may be specified for CUSTOM modes.
// Use the RC_TEST_GROUP_BASE macro to test all valid combinations.