Commit ea2bf5b5 authored by Wez's avatar Wez Committed by Commit Bot

[fuzzer] Use action_max_timeout() for fuzzer Run() timeout.

renderer_fuzzer often takes longer than the default action_timeout() set
by TaskEnvironment as the Run() timeout.

Bug: 1053401, 1053479, 1053634
Change-Id: Ia4f58bf3a480c89875fe4ddce2f80e4d81818ede
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062350
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: default avatarMax Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742590}
parent 7cca8356
......@@ -18,7 +18,7 @@ source_set("fuzzer_support") {
]
public_deps = [
"//base",
"//base/test:test_config",
"//base/test:test_support",
"//content/renderer:for_content_tests",
"//content/shell:content_shell_lib",
"//content/test:test_support",
......
......@@ -8,6 +8,7 @@
#include "base/feature_list.h"
#include "base/i18n/icu_util.h"
#include "base/location.h"
#include "base/test/test_timeouts.h"
#include "gin/v8_initializer.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
......@@ -26,6 +27,11 @@ constexpr gin::V8Initializer::V8SnapshotFileType kSnapshotType =
#endif
}
RenderViewTestAdapter::RenderViewTestAdapter()
// Allow fuzzing test a longer Run() timeout than normal (see
// htps://crbug.com/1053401).
: increased_timeout_(FROM_HERE, TestTimeouts::action_max_timeout()) {}
void RenderViewTestAdapter::SetUp() {
RenderViewTest::SetUp();
CreateFakeWebURLLoaderFactory();
......
......@@ -9,6 +9,7 @@
#include <string>
#include "base/at_exit.h"
#include "base/test/scoped_run_loop_timeout.h"
#include "content/public/test/render_view_test.h"
namespace content {
......@@ -16,7 +17,7 @@ namespace content {
// Adapter to GUnit's test case.
class RenderViewTestAdapter : public RenderViewTest {
public:
RenderViewTestAdapter() : RenderViewTest() {}
RenderViewTestAdapter();
void TestBody() override {}
// make SetUp visible.
......@@ -29,6 +30,8 @@ class RenderViewTestAdapter : public RenderViewTest {
using RenderViewTest::GetMainFrame;
private:
const base::test::ScopedRunLoopTimeout increased_timeout_;
DISALLOW_COPY_AND_ASSIGN(RenderViewTestAdapter);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment