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

Unified Diff: chrome/test/data/webui/md_user_manager/control_bar_tests.js

Issue 2507873003: Allow adding user and launching guest mode when all profiles are lock while force sign in is enable… (Closed)
Patch Set: tommycli's comments Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/webui/signin/md_user_manager_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_user_manager/control_bar_tests.js
diff --git a/chrome/test/data/webui/md_user_manager/control_bar_tests.js b/chrome/test/data/webui/md_user_manager/control_bar_tests.js
index 956c806d4cc890d991e535231871c483e15bc603..edb55273e76c662eb01521db9c9d026f4dd9420a 100644
--- a/chrome/test/data/webui/md_user_manager/control_bar_tests.js
+++ b/chrome/test/data/webui/md_user_manager/control_bar_tests.js
@@ -47,7 +47,7 @@ cr.define('user_manager.control_bar_tests', function() {
test('Can create profile', function() {
return new Promise(function(resolve, reject) {
// We expect to go to the 'create-profile' page.
- controlBarElement.addEventListener('change-page', function(event) {
+ listenOnce(controlBarElement, 'change-page', function(event) {
if (event.detail.page == 'create-user-page')
resolve();
});
@@ -111,6 +111,29 @@ cr.define('user_manager.control_bar_tests', function() {
assertTrue(errorDialogElement.$.dialog.opened);
});
});
+
+ test('Can create profile with force signin', function() {
+ controlBarElement.isForceSigninEnabled_ = true;
+ Polymer.dom.flush();
+ return new Promise(function(resolve, reject) {
+ // We expect to go to the 'create-profile' page.
+ listenOnce(controlBarElement, 'change-page', function(event) {
+ if (event.detail.page == 'create-user-page')
+ resolve();
+ });
+
+ // Simulate clicking 'Create Profile'.
+ MockInteractions.tap(controlBarElement.$.addUser);
+ });
+ });
+
+ test('Can launch guest profile with force sign in', function() {
+ controlBarElement.isForceSigninEnabled_ = true;
+ Polymer.dom.flush();
+ MockInteractions.tap(controlBarElement.$.launchGuest);
+ return browserProxy.whenCalled('launchGuestUser');
+ });
+
});
}
« no previous file with comments | « chrome/browser/ui/webui/signin/md_user_manager_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698