OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @constructor | 6 * @constructor |
7 * @implements {settings.AppearanceBrowserProxy} | 7 * @implements {settings.AppearanceBrowserProxy} |
8 * @extends {settings.TestBrowserProxy} | 8 * @extends {TestBrowserProxy} |
9 */ | 9 */ |
10 var TestAppearanceBrowserProxy = function() { | 10 var TestAppearanceBrowserProxy = function() { |
11 settings.TestBrowserProxy.call(this, [ | 11 TestBrowserProxy.call(this, [ |
12 'getDefaultZoom', | 12 'getDefaultZoom', |
13 'getThemeInfo', | 13 'getThemeInfo', |
14 'isSupervised', | 14 'isSupervised', |
15 'openWallpaperManager', | 15 'openWallpaperManager', |
16 'useDefaultTheme', | 16 'useDefaultTheme', |
17 'useSystemTheme', | 17 'useSystemTheme', |
18 'validateStartupPage', | 18 'validateStartupPage', |
19 ]); | 19 ]); |
20 | 20 |
21 /** @private */ | 21 /** @private */ |
22 this.defaultZoom_ = 1; | 22 this.defaultZoom_ = 1; |
23 | 23 |
24 /** @private */ | 24 /** @private */ |
25 this.isSupervised_ = false; | 25 this.isSupervised_ = false; |
26 | 26 |
27 /** @private */ | 27 /** @private */ |
28 this.isHomeUrlValid_ = true; | 28 this.isHomeUrlValid_ = true; |
29 }; | 29 }; |
30 | 30 |
31 TestAppearanceBrowserProxy.prototype = { | 31 TestAppearanceBrowserProxy.prototype = { |
32 __proto__: settings.TestBrowserProxy.prototype, | 32 __proto__: TestBrowserProxy.prototype, |
33 | 33 |
34 /** @override */ | 34 /** @override */ |
35 getDefaultZoom: function() { | 35 getDefaultZoom: function() { |
36 this.methodCalled('getDefaultZoom'); | 36 this.methodCalled('getDefaultZoom'); |
37 return Promise.resolve(this.defaultZoom_); | 37 return Promise.resolve(this.defaultZoom_); |
38 }, | 38 }, |
39 | 39 |
40 /** @override */ | 40 /** @override */ |
41 getThemeInfo: function(themeId) { | 41 getThemeInfo: function(themeId) { |
42 this.methodCalled('getThemeInfo', themeId); | 42 this.methodCalled('getThemeInfo', themeId); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 Polymer.dom.flush(); | 282 Polymer.dom.flush(); |
283 assertEquals(homeUrlInput.value, '@@@'); // Value hasn't changed. | 283 assertEquals(homeUrlInput.value, '@@@'); // Value hasn't changed. |
284 assertTrue(homeUrlInput.invalid); | 284 assertTrue(homeUrlInput.invalid); |
285 | 285 |
286 // Should reset to default value on change event. | 286 // Should reset to default value on change event. |
287 homeUrlInput.$.input.fire('change'); | 287 homeUrlInput.$.input.fire('change'); |
288 Polymer.dom.flush(); | 288 Polymer.dom.flush(); |
289 assertEquals(homeUrlInput.value, 'test'); | 289 assertEquals(homeUrlInput.value, 'test'); |
290 }); | 290 }); |
291 }); | 291 }); |
292 }); | 292 }); |
OLD | NEW |