| OLD | NEW |
| 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('settings_people_page', function() { | 5 cr.define('settings_people_page', function() { |
| 6 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @implements {settings.ProfileInfoBrowserProxy} | 8 * @implements {settings.ProfileInfoBrowserProxy} |
| 9 * @extends {settings.TestBrowserProxy} | 9 * @extends {settings.TestBrowserProxy} |
| 10 */ | 10 */ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 easyUnlockAllowed: false, | 40 easyUnlockAllowed: false, |
| 41 }); | 41 }); |
| 42 }); | 42 }); |
| 43 | 43 |
| 44 setup(function() { | 44 setup(function() { |
| 45 browserProxy = new TestProfileInfoBrowserProxy(); | 45 browserProxy = new TestProfileInfoBrowserProxy(); |
| 46 settings.ProfileInfoBrowserProxyImpl.instance_ = browserProxy; | 46 settings.ProfileInfoBrowserProxyImpl.instance_ = browserProxy; |
| 47 | 47 |
| 48 PolymerTest.clearBody(); | 48 PolymerTest.clearBody(); |
| 49 peoplePage = document.createElement('settings-people-page'); | 49 peoplePage = document.createElement('settings-people-page'); |
| 50 peoplePage.currentRoute = { | |
| 51 url: '/', | |
| 52 page: 'basic', | |
| 53 section: '', | |
| 54 }; | |
| 55 document.body.appendChild(peoplePage); | 50 document.body.appendChild(peoplePage); |
| 56 }); | 51 }); |
| 57 | 52 |
| 58 teardown(function() { peoplePage.remove(); }); | 53 teardown(function() { peoplePage.remove(); }); |
| 59 | 54 |
| 60 test('GetProfileInfo', function() { | 55 test('GetProfileInfo', function() { |
| 61 return browserProxy.whenCalled('getProfileInfo').then(function() { | 56 return browserProxy.whenCalled('getProfileInfo').then(function() { |
| 62 Polymer.dom.flush(); | 57 Polymer.dom.flush(); |
| 63 assertEquals(browserProxy.fakeProfileInfo.name, | 58 assertEquals(browserProxy.fakeProfileInfo.name, |
| 64 peoplePage.$$('#profile-name').textContent.trim()); | 59 peoplePage.$$('#profile-name').textContent.trim()); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 78 }); | 73 }); |
| 79 }); | 74 }); |
| 80 } | 75 } |
| 81 | 76 |
| 82 return { | 77 return { |
| 83 registerTests: function() { | 78 registerTests: function() { |
| 84 registerProfileInfoTests(); | 79 registerProfileInfoTests(); |
| 85 }, | 80 }, |
| 86 }; | 81 }; |
| 87 }); | 82 }); |
| OLD | NEW |