Index: components/policy/core/common/policy_loader_mac_unittest.cc |
diff --git a/components/policy/core/common/policy_loader_mac_unittest.cc b/components/policy/core/common/policy_loader_mac_unittest.cc |
index 8ed6e55a3078b38bc4ff228903985a6da8f67de2..7f3c14fa94949e6fd254d66ce9a3eeb1d709c0c2 100644 |
--- a/components/policy/core/common/policy_loader_mac_unittest.cc |
+++ b/components/policy/core/common/policy_loader_mac_unittest.cc |
@@ -13,6 +13,7 @@ |
#include "base/mac/scoped_cftyperef.h" |
#include "base/macros.h" |
#include "base/memory/ptr_util.h" |
+#include "base/run_loop.h" |
#include "base/strings/sys_string_conversions.h" |
#include "base/values.h" |
#include "components/policy/core/common/async_policy_provider.h" |
@@ -176,7 +177,8 @@ TEST_F(PolicyLoaderMacTest, Invalid) { |
// Make the provider read the updated |prefs_|. |
provider_->RefreshPolicies(); |
- loop_.RunUntilIdle(); |
+ ASSERT_TRUE(base::MessageLoopForIO::IsCurrent()); |
+ base::RunLoop().RunUntilIdle(); |
const PolicyBundle kEmptyBundle; |
EXPECT_TRUE(provider_->policies().Equals(kEmptyBundle)); |
} |
@@ -191,7 +193,8 @@ TEST_F(PolicyLoaderMacTest, TestNonForcedValue) { |
// Make the provider read the updated |prefs_|. |
provider_->RefreshPolicies(); |
- loop_.RunUntilIdle(); |
+ ASSERT_TRUE(base::MessageLoopForIO::IsCurrent()); |
+ base::RunLoop().RunUntilIdle(); |
PolicyBundle expected_bundle; |
expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) |
.Set(test_keys::kKeyString, POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER, |