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

Unified Diff: chrome/browser/extensions/activity_log/activity_log_unittest.cc

Issue 2980503002: [Extensions][TaskScheduler] Update ActivityLog for scheduling migration (Closed)
Patch Set: . Created 3 years, 5 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
Index: chrome/browser/extensions/activity_log/activity_log_unittest.cc
diff --git a/chrome/browser/extensions/activity_log/activity_log_unittest.cc b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
index cf22b31b8f22519f4da7005c4eaa7cba134cae4b..a853633cf040f99a081943262889cecf70154de6 100644
--- a/chrome/browser/extensions/activity_log/activity_log_unittest.cc
+++ b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
@@ -15,6 +15,7 @@
#include "base/synchronization/waitable_event.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/activity_log/activity_action_constants.h"
+#include "chrome/browser/extensions/activity_log/activity_log_task_runner.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/browser/prerender/prerender_handle.h"
@@ -59,6 +60,10 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
virtual bool enable_activity_logging_switch() const { return true; }
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
+
+ SetActivityLogTaskRunnerForTesting(
+ base::ThreadTaskRunnerHandle::Get().get());
+
base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
if (enable_activity_logging_switch()) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
@@ -74,6 +79,7 @@ class ActivityLogTest : public ChromeRenderViewHostTestHarness {
void TearDown() override {
base::RunLoop().RunUntilIdle();
+ SetActivityLogTaskRunnerForTesting(nullptr);
ChromeRenderViewHostTestHarness::TearDown();
}

Powered by Google App Engine
This is Rietveld 408576698