[scheduling] Use ScopedTaskEnvironment instead of MessageLoop

MessageLoop will go away, eventually.

BUG=891670

Change-Id: I6992d6773ec3f753fe8c225dee223b522593347b
Reviewed-on: https://chromium-review.googlesource.com/c/1323449
Reviewed-by: Robert Kaplow <[email protected]>
Reviewed-by: Alexander Timin <[email protected]>
Commit-Queue: Carlos Caballero <[email protected]>
Cr-Commit-Position: refs/heads/master@{#607187}
diff --git a/components/variations/synthetic_trial_registry_unittest.cc b/components/variations/synthetic_trial_registry_unittest.cc
index 403c134..5e8f0f3 100644
--- a/components/variations/synthetic_trial_registry_unittest.cc
+++ b/components/variations/synthetic_trial_registry_unittest.cc
@@ -6,9 +6,9 @@
 
 #include <string>
 
-#include "base/message_loop/message_loop.h"
 #include "base/metrics/field_trial.h"
 #include "base/strings/stringprintf.h"
+#include "base/test/scoped_task_environment.h"
 #include "components/variations/active_field_trials.h"
 #include "components/variations/hashing.h"
 #include "components/variations/synthetic_trials_active_group_id_provider.h"
@@ -47,7 +47,7 @@
   }
 
  private:
-  base::MessageLoop loop_;
+  base::test::ScopedTaskEnvironment task_environment_;
 
   base::FieldTrialList field_trial_list_;