| 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 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h" | 4 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h" |
| 5 | 5 |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 it != logged_users.end(); ++it) { | 126 it != logged_users.end(); ++it) { |
| 127 if ((*it)->email() == user_context.GetAccountId().GetUserEmail()) | 127 if ((*it)->email() == user_context.GetAccountId().GetUserEmail()) |
| 128 return; | 128 return; |
| 129 } | 129 } |
| 130 ADD_FAILURE() << user_id << " was not added via PreLoginUser()"; | 130 ADD_FAILURE() << user_id << " was not added via PreLoginUser()"; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void AppendCommandLineSwitchesForLoginManager(base::CommandLine* command_line) { | 133 void AppendCommandLineSwitchesForLoginManager(base::CommandLine* command_line) { |
| 134 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 134 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
| 135 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); | 135 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); |
| 136 // LoginManager tests typically don't stand up a policy test server but |
| 137 // instead inject policies directly through a SessionManagerClient. So allow |
| 138 // policy fetches to fail - this is expected. |
| 139 command_line->AppendSwitch( |
| 140 chromeos::switches::kAllowFailedPolicyFetchForTest); |
| 136 } | 141 } |
| 137 | 142 |
| 138 } // namespace affiliation_test_helper | 143 } // namespace affiliation_test_helper |
| 139 | 144 |
| 140 } // namespace policy | 145 } // namespace policy |
| OLD | NEW |