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

Side by Side Diff: chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: Address review comments 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/login/supervised/supervised_user_test_base.h" 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // Select the first user as manager, and enter password. 288 // Select the first user as manager, and enter password.
289 JSExpect("$('supervised-user-creation-next-button').disabled"); 289 JSExpect("$('supervised-user-creation-next-button').disabled");
290 JSSetTextField("#supervised-user-creation .manager-pod.focused input", 290 JSSetTextField("#supervised-user-creation .manager-pod.focused input",
291 kTestManagerPassword); 291 kTestManagerPassword);
292 292
293 JSEval("$('supervised-user-creation').updateNextButtonForManager_()"); 293 JSEval("$('supervised-user-creation').updateNextButtonForManager_()");
294 294
295 // Next button is now enabled. 295 // Next button is now enabled.
296 JSExpect("!$('supervised-user-creation-next-button').disabled"); 296 JSExpect("!$('supervised-user-creation-next-button').disabled");
297 UserContext user_context(kTestManager); 297 UserContext user_context(kTestManager);
298 user_context.SetGaiaID(GetGaiaIDForUserID(kTestManager));
298 user_context.SetKey(Key(kTestManagerPassword)); 299 user_context.SetKey(Key(kTestManagerPassword));
299 SetExpectedCredentials(user_context); 300 SetExpectedCredentials(user_context);
300 content::WindowedNotificationObserver login_observer( 301 content::WindowedNotificationObserver login_observer(
301 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 302 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
302 content::NotificationService::AllSources()); 303 content::NotificationService::AllSources());
303 304
304 // Log in as manager. 305 // Log in as manager.
305 JSEval("$('supervised-user-creation-next-button').click()"); 306 JSEval("$('supervised-user-creation-next-button').click()");
306 login_observer.Wait(); 307 login_observer.Wait();
307 308
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 JSEval(StringPrintf( 439 JSEval(StringPrintf(
439 "$('pod-row').pods[%d].querySelector('.remove-warning-button').click()", 440 "$('pod-row').pods[%d].querySelector('.remove-warning-button').click()",
440 user_index)); 441 user_index));
441 442
442 // Make sure there is no supervised user in list. 443 // Make sure there is no supervised user in list.
443 ASSERT_EQ(original_user_count - 1, 444 ASSERT_EQ(original_user_count - 1,
444 user_manager::UserManager::Get()->GetUsers().size()); 445 user_manager::UserManager::Get()->GetUsers().size());
445 } 446 }
446 447
447 } // namespace chromeos 448 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698