Index: base/metrics/field_trial_unittest.cc |
diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc |
index 09a38093c0f707c23bc029993bbbcd8856d1833f..0e872ff38e7246809ff11ab2de01d6c0788b3d4f 100644 |
--- a/base/metrics/field_trial_unittest.cc |
+++ b/base/metrics/field_trial_unittest.cc |
@@ -2,9 +2,11 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "base/message_loop.h" |
#include "base/metrics/field_trial.h" |
+ |
+#include "base/message_loop.h" |
#include "base/rand_util.h" |
+#include "base/run_loop.h" |
#include "base/stringprintf.h" |
#include "base/string_number_conversions.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -450,7 +452,7 @@ TEST_F(FieldTrialTest, CreateTrialsFromStringObserver) { |
TestFieldTrialObserver observer; |
ASSERT_TRUE(FieldTrialList::CreateTrialsFromString("Abc/def/")); |
- message_loop_.RunUntilIdle(); |
+ RunLoop().RunUntilIdle(); |
EXPECT_EQ("Abc", observer.trial_name()); |
EXPECT_EQ("def", observer.group_name()); |
} |
@@ -637,7 +639,7 @@ TEST_F(FieldTrialTest, Observe) { |
const int chosen_group = trial->group(); |
EXPECT_TRUE(chosen_group == default_group || chosen_group == secondary_group); |
- message_loop_.RunUntilIdle(); |
+ RunLoop().RunUntilIdle(); |
EXPECT_EQ(kTrialName, observer.trial_name()); |
if (chosen_group == default_group) |
EXPECT_EQ(kDefaultGroupName, observer.group_name()); |
@@ -659,13 +661,13 @@ TEST_F(FieldTrialTest, ObserveDisabled) { |
trial->Disable(); |
// Observer shouldn't be notified of a disabled trial. |
- message_loop_.RunUntilIdle(); |
+ RunLoop().RunUntilIdle(); |
EXPECT_TRUE(observer.trial_name().empty()); |
EXPECT_TRUE(observer.group_name().empty()); |
// Observer shouldn't be notified even after a |group()| call. |
EXPECT_EQ(default_group, trial->group()); |
- message_loop_.RunUntilIdle(); |
+ RunLoop().RunUntilIdle(); |
EXPECT_TRUE(observer.trial_name().empty()); |
EXPECT_TRUE(observer.group_name().empty()); |
} |
@@ -685,13 +687,13 @@ TEST_F(FieldTrialTest, ObserveForcedDisabled) { |
trial->Disable(); |
// Observer shouldn't be notified of a disabled trial, even when forced. |
- message_loop_.RunUntilIdle(); |
+ RunLoop().RunUntilIdle(); |
EXPECT_TRUE(observer.trial_name().empty()); |
EXPECT_TRUE(observer.group_name().empty()); |
// Observer shouldn't be notified even after a |group()| call. |
EXPECT_EQ(default_group, trial->group()); |
- message_loop_.RunUntilIdle(); |
+ RunLoop().RunUntilIdle(); |
EXPECT_TRUE(observer.trial_name().empty()); |
EXPECT_TRUE(observer.group_name().empty()); |
} |