Index: components/policy/core/common/cloud/cloud_policy_validator_unittest.cc |
diff --git a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc |
index 3c1716cc544c7491f0535635c20e58141076ceee..bde96f0ab002cf725bde96df8098d98d2474454f 100644 |
--- a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc |
+++ b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc |
@@ -5,6 +5,7 @@ |
#include <vector> |
#include "base/bind.h" |
+#include "base/command_line.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/message_loop/message_loop.h" |
#include "base/message_loop/message_loop_proxy.h" |
@@ -13,6 +14,7 @@ |
#include "components/policy/core/common/cloud/cloud_policy_constants.h" |
#include "components/policy/core/common/cloud/cloud_policy_validator.h" |
#include "components/policy/core/common/cloud/policy_builder.h" |
+#include "components/policy/core/common/policy_switches.h" |
#include "crypto/rsa_private_key.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -43,6 +45,11 @@ class CloudPolicyValidatorTest : public testing::Test { |
policy_.SetDefaultNewSigningKey(); |
} |
+ virtual void SetUp() OVERRIDE { |
+ CommandLine::ForCurrentProcess()->AppendSwitch( |
+ switches::kEnablePolicyKeyVerification); |
+ } |
+ |
void Validate(testing::Action<void(UserCloudPolicyValidator*)> check_action) { |
// Create a validator. |
scoped_ptr<UserCloudPolicyValidator> validator = CreateValidator(); |