Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Side by Side Diff: chrome/browser/chromeos/policy/login_policy_test_base.h

Issue 964503002: Implemented ForceMaximizeBrowserWindowOnFirstRun policy, added unit test and browser test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_
7
8 #include <string>
9
10 #include "base/files/scoped_temp_dir.h"
11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
14
15 namespace base {
16 class FilePath;
17 class DictionaryValue;
18 }
19
20 namespace policy {
21
22 class LocalPolicyTestServer;
23
24 // This class can be used to implement tests which need policy to be set prior
25 // to login.
26 class LoginPolicyTestBase : public chromeos::OobeBaseTest {
27 protected:
28 LoginPolicyTestBase();
29 ~LoginPolicyTestBase() override;
30
31 // chromeos::OobeBaseTest::
32 void SetUp() override;
33 void SetUpCommandLine(base::CommandLine* command_line) override;
34 void SetUpOnMainThread() override;
35
36 virtual scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const;
37 virtual scoped_ptr<base::DictionaryValue> GetRecommendedPoliciesValue() const;
38
39 void SkipToLoginScreen();
40 void LogIn(const std::string& user_id, const std::string& password);
41
42 static const char kAccountPassword[];
43 static const char kAccountId[];
44
45 private:
46 void SetUpGaiaServerWithAccessTokens();
47 void SetMergeSessionParams(const std::string& email);
48 void SetServerPolicy();
49 base::FilePath PolicyFilePath() const;
50
51 scoped_ptr<LocalPolicyTestServer> test_server_;
52 base::ScopedTempDir temp_dir_;
53
54 DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase);
55 };
56
57 } // namespace policy
58
59 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698