OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" | 13 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class FilePath; | 16 class FilePath; |
17 class DictionaryValue; | 17 class DictionaryValue; |
18 } | 18 } |
19 | 19 |
20 namespace policy { | 20 namespace policy { |
21 | 21 |
22 class LocalPolicyTestServer; | 22 class LocalPolicyTestServer; |
23 | 23 |
24 // This class can be used to implement tests which need policy to be set prior | 24 // This class can be used to implement tests which need policy to be set prior |
25 // to login. | 25 // to login. |
26 class LoginPolicyTestBase : public chromeos::OobeBaseTest { | 26 // Boolean parameter is used to run this test for webview (true) and for |
| 27 // iframe (false) GAIA sign in. |
| 28 class LoginPolicyTestBase : public chromeos::OobeBaseTest, |
| 29 public testing::WithParamInterface<bool> { |
27 protected: | 30 protected: |
28 LoginPolicyTestBase(); | 31 LoginPolicyTestBase(); |
29 ~LoginPolicyTestBase() override; | 32 ~LoginPolicyTestBase() override; |
30 | 33 |
31 // chromeos::OobeBaseTest:: | 34 // chromeos::OobeBaseTest:: |
32 void SetUp() override; | 35 void SetUp() override; |
33 void SetUpCommandLine(base::CommandLine* command_line) override; | 36 void SetUpCommandLine(base::CommandLine* command_line) override; |
34 void SetUpOnMainThread() override; | 37 void SetUpOnMainThread() override; |
35 | 38 |
36 virtual scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const; | 39 virtual scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const; |
(...skipping 13 matching lines...) Expand all Loading... |
50 | 53 |
51 scoped_ptr<LocalPolicyTestServer> test_server_; | 54 scoped_ptr<LocalPolicyTestServer> test_server_; |
52 base::ScopedTempDir temp_dir_; | 55 base::ScopedTempDir temp_dir_; |
53 | 56 |
54 DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase); | 57 DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase); |
55 }; | 58 }; |
56 | 59 |
57 } // namespace policy | 60 } // namespace policy |
58 | 61 |
59 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_ | 62 #endif // CHROME_BROWSER_CHROMEOS_POLICY_LOGIN_POLICY_TEST_BASE_H_ |
OLD | NEW |