| Index: chrome/browser/chromeos/policy/login_policy_test_base.h
|
| diff --git a/chrome/browser/chromeos/policy/login_policy_test_base.h b/chrome/browser/chromeos/policy/login_policy_test_base.h
|
| index cf4f8480dcc7c173ea7a57bd57af19ff618ea427..ab07a117f1380f29665dd5771b05856c7e26a813 100644
|
| --- a/chrome/browser/chromeos/policy/login_policy_test_base.h
|
| +++ b/chrome/browser/chromeos/policy/login_policy_test_base.h
|
| @@ -21,6 +21,34 @@ namespace policy {
|
|
|
| class LocalPolicyTestServer;
|
|
|
| +class PolicyTestHelper {
|
| + public:
|
| + PolicyTestHelper(const std::string& user_email,
|
| + const base::DictionaryValue& mandatory,
|
| + const base::DictionaryValue& recommended);
|
| + virtual ~PolicyTestHelper();
|
| +
|
| + void UpdateCommandLine(base::CommandLine* command_line);
|
| + void WaitForInitialPolicy(Profile* profile);
|
| + void UpdatePolicy(Profile* profile,
|
| + const base::DictionaryValue& mandatory,
|
| + const base::DictionaryValue& recommended);
|
| +
|
| + static const char kAccountId[];
|
| +
|
| + private:
|
| + void SetServerPolicy(const base::DictionaryValue& mandatory,
|
| + const base::DictionaryValue& recommended);
|
| + base::FilePath PolicyFilePath() const;
|
| +
|
| + const std::string user_email_;
|
| + base::ScopedTempDir temp_dir_;
|
| + scoped_ptr<LocalPolicyTestServer> test_server_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PolicyTestHelper);
|
| +};
|
| +
|
| +
|
| // This class can be used to implement tests which need policy to be set prior
|
| // to login.
|
| class LoginPolicyTestBase : public chromeos::OobeBaseTest {
|
| @@ -44,12 +72,9 @@ class LoginPolicyTestBase : public chromeos::OobeBaseTest {
|
|
|
| private:
|
| void SetUpGaiaServerWithAccessTokens();
|
| - void SetMergeSessionParams(const std::string& email);
|
| - void SetServerPolicy();
|
| - base::FilePath PolicyFilePath() const;
|
| + void SetMergeSessionParams();
|
|
|
| - scoped_ptr<LocalPolicyTestServer> test_server_;
|
| - base::ScopedTempDir temp_dir_;
|
| + scoped_ptr<PolicyTestHelper> policy_helper_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase);
|
| };
|
|
|