Commit e8ae67a2 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[TaskEnvironment] Get rid of the last explicit usages of MAIN_THREAD_ONLY that...

[TaskEnvironment] Get rid of the last explicit usages of MAIN_THREAD_ONLY that snuck in during the transition

TBR=dcheng@chromium.org

Bug: 992483
Change-Id: I1c95dfd52690fdedb0ae35ffa7da9081e2af182f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796753Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695392}
parent bbb6c94a
...@@ -19,8 +19,7 @@ jboolean JNI_MemoryMetricsLoggerTest_ForceRecordHistograms(JNIEnv* env) { ...@@ -19,8 +19,7 @@ jboolean JNI_MemoryMetricsLoggerTest_ForceRecordHistograms(JNIEnv* env) {
return false; return false;
TestTimeouts::Initialize(); TestTimeouts::Initialize();
base::test::TaskEnvironment task_environment( base::test::SingleThreadTaskEnvironment task_environment;
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY);
base::RunLoop run_loop; base::RunLoop run_loop;
bool result = false; bool result = false;
memory_metrics_logger->ScheduleRecordForTesting( memory_metrics_logger->ScheduleRecordForTesting(
......
...@@ -82,11 +82,7 @@ class MockAppInstallEventLogUploaderDelegate ...@@ -82,11 +82,7 @@ class MockAppInstallEventLogUploaderDelegate
class AppInstallEventLogUploaderTest : public testing::Test { class AppInstallEventLogUploaderTest : public testing::Test {
protected: protected:
AppInstallEventLogUploaderTest() AppInstallEventLogUploaderTest() = default;
: task_environment_(
base::test::TaskEnvironment::TimeSource::MOCK_TIME,
base::test::TaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY),
value_report_(base::Value::Type::DICTIONARY) {}
void TearDown() override { void TearDown() override {
Mock::VerifyAndClearExpectations(&client_); Mock::VerifyAndClearExpectations(&client_);
...@@ -163,9 +159,10 @@ class AppInstallEventLogUploaderTest : public testing::Test { ...@@ -163,9 +159,10 @@ class AppInstallEventLogUploaderTest : public testing::Test {
CaptureUpload(callback); CaptureUpload(callback);
} }
base::test::TaskEnvironment task_environment_; base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
em::AppInstallReportRequest log_; em::AppInstallReportRequest log_;
base::Value value_report_; base::Value value_report_{base::Value::Type::DICTIONARY};
MockCloudPolicyClient client_; MockCloudPolicyClient client_;
MockAppInstallEventLogUploaderDelegate delegate_; MockAppInstallEventLogUploaderDelegate delegate_;
......
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