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

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: Fix after review Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved.
bartfab (slow) 2015/04/01 14:22:42 Nit: s/2014/2015/
peletskyi 2015/04/01 18:55:47 Done.
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>
bartfab (slow) 2015/04/01 14:22:43 Nit: Add blank line below.
peletskyi 2015/04/01 18:55:46 Done.
9 #include "base/files/scoped_temp_dir.h"
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
13
14 namespace base {
15 class FilePath;
16 }
17
18 namespace policy {
19
20 class LocalPolicyTestServer;
21
22 // This class can be used for the tests when policy needs to be set prior login.
bartfab (slow) 2015/04/01 14:22:43 Nit: How about: "This class can be used to impleme
peletskyi 2015/04/01 18:55:46 Done.
23 class LoginPolicyTestBase : public chromeos::OobeBaseTest {
24 protected:
25 LoginPolicyTestBase();
26 ~LoginPolicyTestBase() override;
27
28 // chromeos::OobeBaseTest::
29 void SetUp() override;
30 void SetUpCommandLine(base::CommandLine* command_line) override;
31 void SetUpOnMainThread() override;
32
33 virtual std::string GetMandatoryPolicies() const;
bartfab (slow) 2015/04/01 14:22:43 Rather than expecting tests to manually construct
bartfab (slow) 2015/04/02 08:44:28 I still think it is the right thing to do this.
peletskyi 2015/04/02 12:53:29 Done.
34 virtual std::string GetRecommendedPolicies() const;
35
36 void SkipToLoginScreen();
37 void LogIn(const std::string& user_id, const std::string& password);
38
39 static const char kAccountPassword[];
40 static const char kAccountId[];
41
42 private:
43 void SetUpGaiaServerWithAccessTokens();
44 void SetMergeSessionParams(const std::string& email);
45 void SetServerPolicy();
46 base::FilePath PolicyFilePath() const;
bartfab (slow) 2015/04/01 14:22:43 Nit: When declaring a member of this type (not a p
peletskyi 2015/04/01 18:55:46 Following styleguide we should use like forward de
bartfab (slow) 2015/04/02 08:44:28 Nice catch. I was not aware that for return types,
47
48 scoped_ptr<LocalPolicyTestServer> test_server_;
49 base::ScopedTempDir temp_dir_;
50
51 DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase);
52 };
53
54 } // namespace policy
55 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_
bartfab (slow) 2015/04/01 14:22:43 Nit: Add a blank line above.
peletskyi 2015/04/01 18:55:46 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698