| Index: chrome/test/data/webui/settings/people_page_manage_profile_test.js
|
| diff --git a/chrome/test/data/webui/settings/people_page_manage_profile_test.js b/chrome/test/data/webui/settings/people_page_manage_profile_test.js
|
| index 0af15d9bf1fccf4f341534d7912f39f87f03cc3d..09050485dc6de165cb97fac1778249cecafc338d 100644
|
| --- a/chrome/test/data/webui/settings/people_page_manage_profile_test.js
|
| +++ b/chrome/test/data/webui/settings/people_page_manage_profile_test.js
|
| @@ -94,53 +94,33 @@ cr.define('settings_people_page_manage_profile', function() {
|
|
|
| // Tests that the manage profile subpage
|
| // - gets and receives all the available icons
|
| - // - has the correct icon selected
|
| // - can select a new icon
|
| test('ManageProfileChangeIcon', function() {
|
| - var selector = manageProfile.$.selector.$['avatar-grid'];
|
| - assertTrue(!!selector);
|
| -
|
| + var items = null;
|
| return browserProxy.whenCalled('getAvailableIcons')
|
| .then(function() {
|
| Polymer.dom.flush();
|
| + items = manageProfile.$.selector.$['avatar-grid'].
|
| + querySelectorAll('.avatar');
|
|
|
| - assertEquals('fake-icon-1.png', manageProfile.profileIconUrl);
|
| - assertEquals(3, selector.items.length);
|
| - assertTrue(selector.items[0].classList.contains('iron-selected'));
|
| - assertFalse(
|
| - selector.items[1].classList.contains('iron-selected'));
|
| - assertFalse(
|
| - selector.items[2].classList.contains('iron-selected'));
|
| + // Initially no item is selected, because of crbug.com/710660.
|
| + assertFalse(!!manageProfile.profileAvatar);
|
| + assertEquals(3, items.length);
|
| + assertFalse(items[0].classList.contains('iron-selected'));
|
| + assertFalse(items[1].classList.contains('iron-selected'));
|
| + assertFalse(items[2].classList.contains('iron-selected'));
|
|
|
| - MockInteractions.tap(selector.items[1]);
|
| + MockInteractions.tap(items[1]);
|
| return browserProxy.whenCalled('setProfileIconToDefaultAvatar');
|
| })
|
| .then(function(args) {
|
| assertEquals('fake-icon-2.png', args[0]);
|
|
|
| - MockInteractions.tap(selector.items[2]);
|
| + MockInteractions.tap(items[2]);
|
| return browserProxy.whenCalled('setProfileIconToGaiaAvatar');
|
| });
|
| });
|
|
|
| - // Tests profile icon updates pushed from the browser.
|
| - test('ManageProfileIconUpdated', function() {
|
| - var selector = manageProfile.$.selector.$['avatar-grid'];
|
| - assertTrue(!!selector);
|
| -
|
| - return browserProxy.whenCalled('getAvailableIcons').then(function() {
|
| - manageProfile.profileIconUrl = 'fake-icon-2.png';
|
| -
|
| - Polymer.dom.flush();
|
| -
|
| - assertEquals('fake-icon-2.png', manageProfile.profileIconUrl);
|
| - assertEquals(3, selector.items.length);
|
| - assertFalse(selector.items[0].classList.contains('iron-selected'));
|
| - assertTrue(selector.items[1].classList.contains('iron-selected'));
|
| - assertFalse(selector.items[2].classList.contains('iron-selected'));
|
| - });
|
| - });
|
| -
|
| test('ManageProfileChangeName', function() {
|
| var nameField = manageProfile.$.name;
|
| assertTrue(!!nameField);
|
|
|