Chromium Code Reviews| 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'); |
| + }); |
| + |
| }); |
| } |