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

Unified Diff: chrome/browser/policy/async_policy_provider_unittest.cc

Issue 22493010: policy: load JSON schema into domain descriptor at start time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments and clean up includes Created 7 years, 3 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
Index: chrome/browser/policy/async_policy_provider_unittest.cc
diff --git a/chrome/browser/policy/async_policy_provider_unittest.cc b/chrome/browser/policy/async_policy_provider_unittest.cc
index 677dba84d3756f5b7d563604baeca3c999b85cdd..0cceabd3a0b2ec933a1b58c9262bd8f5ef463829 100644
--- a/chrome/browser/policy/async_policy_provider_unittest.cc
+++ b/chrome/browser/policy/async_policy_provider_unittest.cc
@@ -106,10 +106,15 @@ void AsyncPolicyProviderTest::SetUp() {
provider_.reset(
new AsyncPolicyProvider(scoped_ptr<AsyncPolicyLoader>(loader_)));
- provider_->Init();
- // Verify that the initial load is done synchronously:
+ // Initial load shouldn't happen until invoked.
+ EXPECT_FALSE(provider_->policies().Equals(initial_bundle_));
+
+ // Now perform an initial synchronous load.
+ provider_->InitialLoad();
EXPECT_TRUE(provider_->policies().Equals(initial_bundle_));
+ provider_->Init();
+
loop_.RunUntilIdle();
Mock::VerifyAndClearExpectations(loader_);

Powered by Google App Engine
This is Rietveld 408576698