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

Side by Side Diff: chrome/browser/chromeos/policy/login_policy_base_test.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: Fixed description 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.
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_BASE_TEST_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_BASE_TEST_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
11 #include "chrome/browser/policy/test/local_policy_test_server.h"
bartfab (slow) 2015/03/12 11:54:47 Nit: A forward-declaration is sufficient here. Mov
peletskyi 2015/03/18 13:28:12 Done.
12
13 namespace policy {
14
15 class LoginPolicyBaseTest : public chromeos::OobeBaseTest {
bartfab (slow) 2015/03/12 11:54:46 Nit 1: This is not a base test, it is a *test base
peletskyi 2015/03/18 13:28:12 Renamed. But why we have OobeBaseTest, not OobeTes
bartfab (slow) 2015/04/01 14:22:41 Yeah, that one is definitely poorly named :(.
16 protected:
17 LoginPolicyBaseTest();
18 ~LoginPolicyBaseTest() override;
bartfab (slow) 2015/03/12 11:54:46 Nit: No need to override the destructor.
peletskyi 2015/03/18 13:28:12 It will not be compiled without override.
bartfab (slow) 2015/04/01 14:22:41 I mean no need to add a destructor at all. You are
peletskyi 2015/04/01 18:55:45 The compiler writes: ../../chrome/browser/chromeos
bartfab (slow) 2015/04/02 08:44:27 Sure, let's leave it. I am still surprise it insis
19
20 void SetUp() override;
bartfab (slow) 2015/03/12 11:54:47 Nit: Add // chromeos::OobeBaseTest:
peletskyi 2015/03/18 13:28:12 Done.
21 void SetUpCommandLine(base::CommandLine* command_line) override;
22 void SetUpOnMainThread() override;
23 void SetupGaiaServerWithAccessTokens();
bartfab (slow) 2015/03/12 11:54:47 Nit 1: Add blank line above. Nit 2: s/Setup/SetUp/
peletskyi 2015/03/18 13:28:12 Done.
24 void SetMergeSessionParams(const std::string& email);
bartfab (slow) 2015/03/12 11:54:47 Nit 1: #include <string> Nit 2: Make this private.
peletskyi 2015/03/18 13:28:12 Done.
25 void SkipToLoginScreen();
26 void LogIn(const std::string& user_id, const std::string& password);
27 void SetServerPolicy();
bartfab (slow) 2015/03/12 11:54:46 Nit: Make this private.
peletskyi 2015/03/18 13:28:12 Done.
28 virtual std::string GetPolicy() const = 0;
29
30 base::FilePath policy_file_path() const;
bartfab (slow) 2015/03/12 11:54:46 1: If a method is not inlined, it should not be na
peletskyi 2015/03/18 13:28:12 (1,2) done. (3) It is used twice :).
31 scoped_ptr<LocalPolicyTestServer> test_server_;
bartfab (slow) 2015/03/12 11:54:47 Nit: Make this private if it is not used by any de
peletskyi 2015/03/18 13:28:12 Done.
32
33 base::ScopedTempDir temp_dir_;
bartfab (slow) 2015/03/12 11:54:47 Nit 1: Make this private if it is not used by any
peletskyi 2015/03/18 13:28:12 Done.
34
35 static const char kAccountPassword[];
bartfab (slow) 2015/03/12 11:54:47 Nit: There is no need for the base class to define
peletskyi 2015/03/18 13:28:12 Yes, but it is needed in both derived classes and
36 static const char kAccountId[];
bartfab (slow) 2015/03/12 11:54:47 I think it would be better to expose this as a met
peletskyi 2015/03/18 13:28:12 What is the advantage? In case with method they wi
bartfab (slow) 2015/04/01 14:22:41 Acknowledged.
37
38 private:
39 DISALLOW_COPY_AND_ASSIGN(LoginPolicyBaseTest);
40 };
41
42 } // namespace policy
43 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_BASE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698