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_startup_urls_page', function() { | 5 cr.define('settings_startup_urls_page', function() { |
6 /** | 6 /** |
7 * @constructor | 7 * @constructor |
8 * @implements {settings.StartupUrlsPageBrowserProxy} | 8 * @implements {settings.StartupUrlsPageBrowserProxy} |
9 * @extends {settings.TestBrowserProxy} | 9 * @extends {TestBrowserProxy} |
10 */ | 10 */ |
11 function TestStartupUrlsPageBrowserProxy() { | 11 function TestStartupUrlsPageBrowserProxy() { |
12 settings.TestBrowserProxy.call(this, [ | 12 TestBrowserProxy.call(this, [ |
13 'addStartupPage', | 13 'addStartupPage', |
14 'editStartupPage', | 14 'editStartupPage', |
15 'loadStartupPages', | 15 'loadStartupPages', |
16 'removeStartupPage', | 16 'removeStartupPage', |
17 'useCurrentPages', | 17 'useCurrentPages', |
18 'validateStartupPage', | 18 'validateStartupPage', |
19 ]); | 19 ]); |
20 | 20 |
21 /** @private {boolean} */ | 21 /** @private {boolean} */ |
22 this.urlIsValid_ = true; | 22 this.urlIsValid_ = true; |
23 } | 23 } |
24 | 24 |
25 TestStartupUrlsPageBrowserProxy.prototype = { | 25 TestStartupUrlsPageBrowserProxy.prototype = { |
26 __proto__: settings.TestBrowserProxy.prototype, | 26 __proto__: TestBrowserProxy.prototype, |
27 | 27 |
28 /** @param {boolean} isValid */ | 28 /** @param {boolean} isValid */ |
29 setUrlValidity: function(isValid) { | 29 setUrlValidity: function(isValid) { |
30 this.urlIsValid_ = isValid; | 30 this.urlIsValid_ = isValid; |
31 }, | 31 }, |
32 | 32 |
33 /** @override */ | 33 /** @override */ |
34 addStartupPage: function(url) { | 34 addStartupPage: function(url) { |
35 this.methodCalled('addStartupPage', url); | 35 this.methodCalled('addStartupPage', url); |
36 return Promise.resolve(this.urlIsValid_); | 36 return Promise.resolve(this.urlIsValid_); |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 test('Editable', function() { | 355 test('Editable', function() { |
356 assertFalse(!!element.editable); | 356 assertFalse(!!element.editable); |
357 assertFalse(!!element.$$('#dots')); | 357 assertFalse(!!element.$$('#dots')); |
358 | 358 |
359 element.editable = true; | 359 element.editable = true; |
360 Polymer.dom.flush(); | 360 Polymer.dom.flush(); |
361 assertTrue(!!element.$$('#dots')); | 361 assertTrue(!!element.$$('#dots')); |
362 }); | 362 }); |
363 }); | 363 }); |
364 }); | 364 }); |
OLD | NEW |