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

Side by Side Diff: chrome/browser/resources/md_user_manager/import_supervised_user.js

Issue 1995043003: Fix UserManagerBrowserTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: esaber Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/test/data/webui/md_user_manager/import_supervised_user_tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 'import-supervised-user' is a popup that allows user to select 6 * @fileoverview 'import-supervised-user' is a popup that allows user to select
7 * a supervised profile from a list of profiles to import on the current device. 7 * a supervised profile from a list of profiles to import on the current device.
8 */ 8 */
9 (function() { 9 (function() {
10 /** 10 /**
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return a.onCurrentDevice ? 1 : -1; 71 return a.onCurrentDevice ? 1 : -1;
72 return a.name.localeCompare(b.name); 72 return a.name.localeCompare(b.name);
73 }); 73 });
74 74
75 this.supervisedUserIndex_ = NO_USER_SELECTED; 75 this.supervisedUserIndex_ = NO_USER_SELECTED;
76 76
77 this.signedInUser_ = signedInUser || null; 77 this.signedInUser_ = signedInUser || null;
78 if (this.signedInUser_) 78 if (this.signedInUser_)
79 this.popupHidden_ = false; 79 this.popupHidden_ = false;
80 80
81 if (this.popupHidden_)
82 return;
83
81 this.async(function() { 84 this.async(function() {
82 this.$$('paper-listbox').focus(); 85 this.$$('paper-listbox').focus();
83 }.bind(this)); 86 }.bind(this));
84 }, 87 },
85 88
86 /** 89 /**
87 * Computed binding that returns the appropriate import message depending on 90 * Computed binding that returns the appropriate import message depending on
88 * whether or not there are any supervised users to import. 91 * whether or not there are any supervised users to import.
89 * @param {!Array<!SupervisedUser>} supervisedUsers 92 * @param {!Array<!SupervisedUser>} supervisedUsers
90 * @private 93 * @private
(...skipping 30 matching lines...) Expand all
121 var supervisedUser = this.supervisedUsers_[this.supervisedUserIndex_]; 124 var supervisedUser = this.supervisedUsers_[this.supervisedUserIndex_];
122 if (this.signedInUser_ && supervisedUser) { 125 if (this.signedInUser_ && supervisedUser) {
123 this.popupHidden_ = true; 126 this.popupHidden_ = true;
124 // Event is caught by create-profile. 127 // Event is caught by create-profile.
125 this.fire('import', {supervisedUser: supervisedUser, 128 this.fire('import', {supervisedUser: supervisedUser,
126 signedInUser: this.signedInUser_}); 129 signedInUser: this.signedInUser_});
127 } 130 }
128 } 131 }
129 }); 132 });
130 })(); 133 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/md_user_manager/import_supervised_user_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698