Chromium Code Reviews| 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..536f31407d1098691320fef1a763d568fc780573 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(); |
| + EXPECT_TRUE(base::MessageLoopForIO::IsCurrent()); |
|
groby-ooo-7-16
2016/09/21 17:52:05
You currently assert in some files, and expect in
fdoray
2016/09/21 18:08:01
Done. ASSERT everywhere.
|
| + 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(); |
| + EXPECT_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, |