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

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

Issue 1939933002: MD User Manager: Supervised user checkbox is always displaying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md-user-manager-stylesheets
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/md_user_manager/create_profile_tests.js
diff --git a/chrome/test/data/webui/md_user_manager/create_profile_tests.js b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
index f6b65d255480c59dfad19eea0ed122f3e7afbe49..6584bf0d55a5ee9b1d20be52d95acd9af8cbac59 100644
--- a/chrome/test/data/webui/md_user_manager/create_profile_tests.js
+++ b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
@@ -58,7 +58,7 @@ cr.define('user_manager.create_profile_tests', function() {
// The 'learn more' link is visible.
assertTrue(!!createProfileElement.$$('#learn-more'));
- // The dropdown menu is visible only when the checkbox is checked.
+ // The dropdown menu becomes visible when the checkbox is checked.
assertFalse(!!createProfileElement.$$('paper-dropdown-menu'));
// Simulate checking the checkbox.
@@ -378,9 +378,16 @@ cr.define('user_manager.create_profile_tests', function() {
return browserProxy.whenCalled('getSignedInUsers').then(function() {
assertEquals(0, createProfileElement.signedInUsers_.length);
- // '#supervised-user-container' is not present in the DOM.
- var container = createProfileElement.$$('#supervised-user-container');
- assertFalse(!!container);
+ // Simulate checking the checkbox.
+ MockInteractions.tap(createProfileElement.$$('paper-checkbox'));
+ Polymer.dom.flush();
+
+ // The dropdown menu is not visible when there are no signed in users.
+ assertFalse(!!createProfileElement.$$('paper-dropdown-menu'));
tommycli 2016/05/02 19:10:13 you will also need an assertTrue(fooElement.hidde
Moe 2016/05/02 20:34:57 This line is asserting that the dropdown does NOT
tommycli 2016/05/02 21:57:49 Ah you're right. thanks
+
+ // Instead a message containing a link to the Help Center on how
+ // to sign in to Chrome is displaying.
+ assertTrue(!!createProfileElement.$$('#sign-in-to-chrome'));
});
});

Powered by Google App Engine
This is Rietveld 408576698