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_
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
15 class DictionaryValue
;
20 class UserPolicyTestHelper
;
22 // This class can be used to implement tests which need policy to be set prior
24 class LoginPolicyTestBase
: public chromeos::OobeBaseTest
{
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
[];
44 void SetUpGaiaServerWithAccessTokens();
45 void SetMergeSessionParams();
47 scoped_ptr
<UserPolicyTestHelper
> user_policy_helper_
;
49 DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase
);
54 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_