Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / policy / login_policy_test_base.h
blob4c4444141d68ec48abc1ac020f1087a48145b35a
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
14 namespace base {
15 class DictionaryValue;
18 namespace policy {
20 class UserPolicyTestHelper;
22 // This class can be used to implement tests which need policy to be set prior
23 // to login.
24 class LoginPolicyTestBase : public chromeos::OobeBaseTest {
25 protected:
26 LoginPolicyTestBase();
27 ~LoginPolicyTestBase() override;
29 // chromeos::OobeBaseTest::
30 void SetUp() override;
31 void SetUpCommandLine(base::CommandLine* command_line) override;
32 void SetUpOnMainThread() override;
34 virtual void GetMandatoryPoliciesValue(base::DictionaryValue* policy) const;
35 virtual void GetRecommendedPoliciesValue(base::DictionaryValue* policy) const;
37 void SkipToLoginScreen();
38 void LogIn(const std::string& user_id, const std::string& password);
40 static const char kAccountPassword[];
41 static const char kAccountId[];
43 private:
44 void SetUpGaiaServerWithAccessTokens();
45 void SetMergeSessionParams();
47 scoped_ptr<UserPolicyTestHelper> user_policy_helper_;
49 DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase);
52 } // namespace policy
54 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_