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

Unified Diff: base/metrics/field_trial_unittest.cc

Issue 12226007: base: Convert the remaining uses of MessageLoop::RunUntilIdle to RunLoop variant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 10 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 | « base/message_pump_glib_unittest.cc ('k') | base/observer_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « base/message_pump_glib_unittest.cc ('k') | base/observer_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698