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

Side by Side Diff: chrome/browser/chromeos/policy/login_policy_test_base.cc

Issue 1095843003: [cros] Modify oobe/login tests to work with webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review 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
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 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 &root_dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &jsonPolicy); 59 &root_dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &jsonPolicy);
60 return jsonPolicy; 60 return jsonPolicy;
61 } 61 }
62 62
63 } // namespace 63 } // namespace
64 64
65 const char LoginPolicyTestBase::kAccountPassword[] = "letmein"; 65 const char LoginPolicyTestBase::kAccountPassword[] = "letmein";
66 const char LoginPolicyTestBase::kAccountId[] = "user@example.com"; 66 const char LoginPolicyTestBase::kAccountId[] = "user@example.com";
67 67
68 LoginPolicyTestBase::LoginPolicyTestBase() { 68 LoginPolicyTestBase::LoginPolicyTestBase() {
69 set_use_webview(GetParam());
69 set_open_about_blank_on_browser_launch(false); 70 set_open_about_blank_on_browser_launch(false);
70 } 71 }
71 72
72 LoginPolicyTestBase::~LoginPolicyTestBase() { 73 LoginPolicyTestBase::~LoginPolicyTestBase() {
73 } 74 }
74 75
75 void LoginPolicyTestBase::SetUp() { 76 void LoginPolicyTestBase::SetUp() {
76 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 77 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
77 SetServerPolicy(); 78 SetServerPolicy();
78 79
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const int bytes_written = 158 const int bytes_written =
158 base::WriteFile(PolicyFilePath(), policy.data(), policy.size()); 159 base::WriteFile(PolicyFilePath(), policy.data(), policy.size());
159 ASSERT_EQ(static_cast<int>(policy.size()), bytes_written); 160 ASSERT_EQ(static_cast<int>(policy.size()), bytes_written);
160 } 161 }
161 162
162 base::FilePath LoginPolicyTestBase::PolicyFilePath() const { 163 base::FilePath LoginPolicyTestBase::PolicyFilePath() const {
163 return temp_dir_.path().AppendASCII("policy.json"); 164 return temp_dir_.path().AppendASCII("policy.json");
164 } 165 }
165 166
166 } // namespace policy 167 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698