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

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: Added JSONWriter and removed depricated function. 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 }
18
19 namespace policy {
20
21 class LocalPolicyTestServer;
22
23 // This class can be used to implement tests which need policy to be set prior
24 // to login.
25 class LoginPolicyTestBase : public chromeos::OobeBaseTest {
26 protected:
27 LoginPolicyTestBase();
28 ~LoginPolicyTestBase() override;
29
30 // chromeos::OobeBaseTest::
31 void SetUp() override;
32 void SetUpCommandLine(base::CommandLine* command_line) override;
33 void SetUpOnMainThread() override;
34
35 virtual base::DictionaryValue* GetMandatoryPoliciesValue() const;
bartfab (slow) 2015/04/02 13:29:31 Nit 1: Forward-declare base::DictionaryValue. Nit
peletskyi 2015/04/02 15:24:50 Done.
36 virtual base::DictionaryValue* GetRecommendedPoliciesValue() const;
37
38 void SkipToLoginScreen();
39 void LogIn(const std::string& user_id, const std::string& password);
40
41 static const char kAccountPassword[];
42 static const char kAccountId[];
43
44 private:
45 void SetUpGaiaServerWithAccessTokens();
46 void SetMergeSessionParams(const std::string& email);
47 void SetServerPolicy();
48 base::FilePath PolicyFilePath() const;
49
50 scoped_ptr<LocalPolicyTestServer> test_server_;
51 base::ScopedTempDir temp_dir_;
52
53 DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase);
54 };
55
56 } // namespace policy
57
58 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698