Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1773)

Unified Diff: content/renderer/render_thread_impl_browsertest.cc

Issue 2732213004: Move FieldTrialRecorder mojom to content (Closed)
Patch Set: initialize FieldTrialList for RenderThreadImplBrowserTest Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl_browsertest.cc
diff --git a/content/renderer/render_thread_impl_browsertest.cc b/content/renderer/render_thread_impl_browsertest.cc
index 6331ecebd38617e6f48be229f43d42841c310fe5..c1562f8abe4e36cfcdeee2fe7160c7772da2535d 100644
--- a/content/renderer/render_thread_impl_browsertest.cc
+++ b/content/renderer/render_thread_impl_browsertest.cc
@@ -13,6 +13,7 @@
#include "base/debug/leak_annotations.h"
#include "base/location.h"
#include "base/memory/discardable_memory.h"
+#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
@@ -163,6 +164,8 @@ class QuitOnTestMsgFilter : public IPC::MessageFilter {
class RenderThreadImplBrowserTest : public testing::Test {
public:
+ RenderThreadImplBrowserTest() : field_trial_list_(nullptr) {}
+
void SetUp() override {
// SequencedWorkerPool is enabled by default in tests. Disable it for this
// test to avoid a DCHECK failure when RenderThreadImpl::Init enables it.
@@ -212,6 +215,9 @@ class RenderThreadImplBrowserTest : public testing::Test {
blink::scheduler::RendererScheduler::Create();
scoped_refptr<base::SingleThreadTaskRunner> test_task_counter(
test_task_counter_.get());
+
+ base::FieldTrialList::CreateTrialsFromCommandLine(
+ *cmd, switches::kFieldTrialHandle, -1);
thread_ = new RenderThreadImplForTest(
InProcessChildThreadParams(io_task_runner,
child_connection_->service_token()),
@@ -248,6 +254,8 @@ class RenderThreadImplBrowserTest : public testing::Test {
std::unique_ptr<MockRenderProcess> mock_process_;
scoped_refptr<QuitOnTestMsgFilter> test_msg_filter_;
RenderThreadImplForTest* thread_; // Owned by mock_process_.
+
+ base::FieldTrialList field_trial_list_;
};
void CheckRenderThreadInputHandlerManager(RenderThreadImpl* thread) {
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698