Create a PolicyManager instance on the SystemState.
This patch creates the PolicyManager object on the update engine's
SystemState class, which aggregates all the singleton classes.
This patch doesn't add any functionality, other than initialize and
destroy the PolicyManager, State and Providers from the SystemState.
BUG=chromium:354079
TEST=Build.
Change-Id: Ib06d9c3d24926eaca43de2d11770ef6da7d16985
Reviewed-on: https://chromium-review.googlesource.com/191502
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/policy_manager/policy_manager_unittest.cc b/policy_manager/policy_manager_unittest.cc
index 00a83b4..1562727 100644
--- a/policy_manager/policy_manager_unittest.cc
+++ b/policy_manager/policy_manager_unittest.cc
@@ -4,6 +4,7 @@
#include <algorithm>
#include <string>
+#include <utility>
#include <vector>
#include <base/bind.h>
@@ -32,11 +33,12 @@
class PmPolicyManagerTest : public ::testing::Test {
protected:
virtual void SetUp() {
- FakeState* fake_state = new FakeState();
- ASSERT_TRUE(fake_state->Init());
- EXPECT_TRUE(pmut_.Init(fake_state));
+ fake_state_ = FakeState::Construct();
+ PMTEST_ASSERT_NOT_NULL(fake_state_);
+ EXPECT_TRUE(pmut_.Init(fake_state_));
}
+ FakeState* fake_state_;
PolicyManager pmut_;
};