Index: base/prefs/public/pref_member_unittest.cc |
diff --git a/base/prefs/public/pref_member_unittest.cc b/base/prefs/public/pref_member_unittest.cc |
index 4203db3aa3caabe01bb771d9897cf976f472378c..eab5a4cc986032c55012c54ff62a2e19fd49c80a 100644 |
--- a/base/prefs/public/pref_member_unittest.cc |
+++ b/base/prefs/public/pref_member_unittest.cc |
@@ -56,6 +56,12 @@ class GetPrefValueHelper |
event.Wait(); |
} |
+ // The thread must be stopped on the main thread. GetPrefValueHelper being |
+ // ref-counted, the destructor can be called from any thread. |
+ void StopThread() { |
+ pref_thread_.Stop(); |
+ } |
+ |
bool value() { return value_; } |
private: |
@@ -313,4 +319,6 @@ TEST(PrefMemberTest, MoveToThread) { |
helper->FetchValue(); |
EXPECT_TRUE(helper->value()); |
+ |
+ helper->StopThread(); |
} |