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

Unified Diff: chrome/browser/chromeos/policy/login_policy_test_base.h

Issue 1185593002: Move reusable part of LoginPolicyTestBase into a helper class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@key_perm
Patch Set: Addressed comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/login_policy_test_base.h
diff --git a/chrome/browser/chromeos/policy/login_policy_test_base.h b/chrome/browser/chromeos/policy/login_policy_test_base.h
index cf4f8480dcc7c173ea7a57bd57af19ff618ea427..4c4444141d68ec48abc1ac020f1087a48145b35a 100644
--- a/chrome/browser/chromeos/policy/login_policy_test_base.h
+++ b/chrome/browser/chromeos/policy/login_policy_test_base.h
@@ -7,19 +7,17 @@
#include <string>
-#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chromeos/login/test/oobe_base_test.h"
namespace base {
-class FilePath;
class DictionaryValue;
}
namespace policy {
-class LocalPolicyTestServer;
+class UserPolicyTestHelper;
// This class can be used to implement tests which need policy to be set prior
// to login.
@@ -33,8 +31,8 @@ class LoginPolicyTestBase : public chromeos::OobeBaseTest {
void SetUpCommandLine(base::CommandLine* command_line) override;
void SetUpOnMainThread() override;
- virtual scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const;
- virtual scoped_ptr<base::DictionaryValue> GetRecommendedPoliciesValue() const;
+ virtual void GetMandatoryPoliciesValue(base::DictionaryValue* policy) const;
+ virtual void GetRecommendedPoliciesValue(base::DictionaryValue* policy) const;
void SkipToLoginScreen();
void LogIn(const std::string& user_id, const std::string& password);
@@ -44,12 +42,9 @@ class LoginPolicyTestBase : public chromeos::OobeBaseTest {
private:
void SetUpGaiaServerWithAccessTokens();
- void SetMergeSessionParams(const std::string& email);
- void SetServerPolicy();
- base::FilePath PolicyFilePath() const;
+ void SetMergeSessionParams();
- scoped_ptr<LocalPolicyTestServer> test_server_;
- base::ScopedTempDir temp_dir_;
+ scoped_ptr<UserPolicyTestHelper> user_policy_helper_;
DISALLOW_COPY_AND_ASSIGN(LoginPolicyTestBase);
};

Powered by Google App Engine
This is Rietveld 408576698