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

Side by Side Diff: chrome/browser/chromeos/cros/network_library_unittest.cc

Issue 14028010: CrOS multi-profiles ProfileManager changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_user_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <cert.h> 5 #include <cert.h>
6 #include <pk11pub.h> 6 #include <pk11pub.h>
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 // Load the ONC from |onc_file| using NetworkLibrary::LoadOncNetworks. Check 162 // Load the ONC from |onc_file| using NetworkLibrary::LoadOncNetworks. Check
163 // that return value matches |expect_successful_import| and the configuration 163 // that return value matches |expect_successful_import| and the configuration
164 // that would be sent to Shill matches |shill_json|. 164 // that would be sent to Shill matches |shill_json|.
165 void LoadOncAndVerifyNetworks(std::string onc_file, 165 void LoadOncAndVerifyNetworks(std::string onc_file,
166 std::string shill_json, 166 std::string shill_json,
167 onc::ONCSource source, 167 onc::ONCSource source,
168 bool expect_successful_import) { 168 bool expect_successful_import) {
169 ScopedMockUserManagerEnabler mock_user_manager; 169 ScopedMockUserManagerEnabler mock_user_manager;
170 mock_user_manager.user_manager()->SetLoggedInUser("madmax@my.domain.com"); 170 mock_user_manager.user_manager()->SetActiveUser("madmax@my.domain.com");
171 EXPECT_CALL(*mock_user_manager.user_manager(), IsUserLoggedIn()) 171 EXPECT_CALL(*mock_user_manager.user_manager(), IsUserLoggedIn())
172 .Times(AnyNumber()) 172 .Times(AnyNumber())
173 .WillRepeatedly(Return(true)); 173 .WillRepeatedly(Return(true));
174 174
175 std::string onc_blob = 175 std::string onc_blob =
176 onc::test_utils::ReadTestData(onc_file); 176 onc::test_utils::ReadTestData(onc_file);
177 177
178 scoped_ptr<base::Value> expected_value = 178 scoped_ptr<base::Value> expected_value =
179 google_apis::test_util::LoadJSONFile(shill_json); 179 google_apis::test_util::LoadJSONFile(shill_json);
180 base::DictionaryValue* expected_configs; 180 base::DictionaryValue* expected_configs;
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 501
502 // TODO(stevenjb): Test network profiles. 502 // TODO(stevenjb): Test network profiles.
503 503
504 // TODO(stevenjb): Test network devices. 504 // TODO(stevenjb): Test network devices.
505 505
506 // TODO(stevenjb): Test data plans. 506 // TODO(stevenjb): Test data plans.
507 507
508 // TODO(stevenjb): Test monitor network / device. 508 // TODO(stevenjb): Test monitor network / device.
509 509
510 } // namespace chromeos 510 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698