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

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: 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
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..c91086f0b2f4688a829cf079082859a696d93dcc 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
@@ -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.
+ controlBarElement.addEventListener('change-page', function(event) {
tommycli 2016/11/17 23:06:23 You can use the listenOnce method instead, since t
zmin 2016/11/17 23:30:04 Done. Also did to the test case above which is the
+ 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');
+ });
+
});
}

Powered by Google App Engine
This is Rietveld 408576698