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

Side by Side Diff: chrome/test/data/webui/md_user_manager/create_profile_tests.js

Issue 2950943002: MD Settings: Stop using IronMenuBehavior from cr-profile-avatar-selector-grid. (Closed)
Patch Set: Added comment. Created 3 years, 6 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
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 cr.define('user_manager.create_profile_tests', function() { 5 cr.define('user_manager.create_profile_tests', function() {
6 /** @return {!CreateProfileElement} */ 6 /** @return {!CreateProfileElement} */
7 function createElement() { 7 function createElement() {
8 var createProfileElement = document.createElement('create-profile'); 8 var createProfileElement = document.createElement('create-profile');
9 document.body.appendChild(createProfileElement); 9 document.body.appendChild(createProfileElement);
10 return createProfileElement; 10 return createProfileElement;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 }); 47 });
48 48
49 teardown(function(done) { 49 teardown(function(done) {
50 createProfileElement.remove(); 50 createProfileElement.remove();
51 // Allow asynchronous tasks to finish. 51 // Allow asynchronous tasks to finish.
52 setTimeout(done); 52 setTimeout(done);
53 }); 53 });
54 54
55 test('Handles available profile icons', function() { 55 test('Handles available profile icons', function() {
56 return browserProxy.whenCalled('getAvailableIcons').then(function() { 56 return browserProxy.whenCalled('getAvailableIcons').then(function() {
57 assertEquals('icon1.png', createProfileElement.profileIconUrl_); 57 assertEquals(2, createProfileElement.availableIcons_.length);
58 }); 58 });
59 }); 59 });
60 60
61 test('Handles signed in users', function() { 61 test('Handles signed in users', function() {
62 return browserProxy.whenCalled('getSignedInUsers').then(function() { 62 return browserProxy.whenCalled('getSignedInUsers').then(function() {
63 assertEquals(1, createProfileElement.signedInUsers_.length); 63 assertEquals(1, createProfileElement.signedInUsers_.length);
64 assertEquals('username', 64 assertEquals('username',
65 createProfileElement.signedInUsers_[0].username); 65 createProfileElement.signedInUsers_[0].username);
66 assertEquals('path/to/profile', 66 assertEquals('path/to/profile',
67 createProfileElement.signedInUsers_[0].profilePath); 67 createProfileElement.signedInUsers_[0].profilePath);
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 createProfileElement.$$("#makeSupervisedCheckbox"); 546 createProfileElement.$$("#makeSupervisedCheckbox");
547 assertTrue(createSupervisedUserCheckbox.clientHeight > 0); 547 assertTrue(createSupervisedUserCheckbox.clientHeight > 0);
548 }); 548 });
549 }); 549 });
550 } 550 }
551 551
552 return { 552 return {
553 registerTests: registerTests, 553 registerTests: registerTests,
554 }; 554 };
555 }); 555 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698