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

Side by Side Diff: chrome/test/data/webui/settings/appearance_fonts_page_test.js

Issue 2927653002: WebUI: Move test_browser_proxy.js one level up. (Closed)
Patch Set: 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {settings.FontsBrowserProxy} 7 * @implements {settings.FontsBrowserProxy}
8 * @extends {settings.TestBrowserProxy} 8 * @extends {test.TestBrowserProxy}
9 */ 9 */
10 var TestFontsBrowserProxy = function() { 10 var TestFontsBrowserProxy = function() {
11 settings.TestBrowserProxy.call(this, [ 11 test.TestBrowserProxy.call(this, [
12 'fetchFontsData', 12 'fetchFontsData',
13 'observeAdvancedFontExtensionAvailable', 13 'observeAdvancedFontExtensionAvailable',
14 'openAdvancedFontSettings', 14 'openAdvancedFontSettings',
15 ]); 15 ]);
16 16
17 /** @private {!FontsData} */ 17 /** @private {!FontsData} */
18 this.fontsData_ = { 18 this.fontsData_ = {
19 'fontList': [['font name', 'alternate', 'ltr']], 19 'fontList': [['font name', 'alternate', 'ltr']],
20 'encodingList': [['encoding name', 'alternate', 'ltr']], 20 'encodingList': [['encoding name', 'alternate', 'ltr']],
21 }; 21 };
22 }; 22 };
23 23
24 TestFontsBrowserProxy.prototype = { 24 TestFontsBrowserProxy.prototype = {
25 __proto__: settings.TestBrowserProxy.prototype, 25 __proto__: test.TestBrowserProxy.prototype,
26 26
27 /** @override */ 27 /** @override */
28 fetchFontsData: function() { 28 fetchFontsData: function() {
29 this.methodCalled('fetchFontsData'); 29 this.methodCalled('fetchFontsData');
30 return Promise.resolve(this.fontsData_); 30 return Promise.resolve(this.fontsData_);
31 }, 31 },
32 32
33 /** @override */ 33 /** @override */
34 observeAdvancedFontExtensionAvailable: function() { 34 observeAdvancedFontExtensionAvailable: function() {
35 this.methodCalled('observeAdvancedFontExtensionAvailable'); 35 this.methodCalled('observeAdvancedFontExtensionAvailable');
(...skipping 29 matching lines...) Expand all
65 65
66 test('openAdvancedFontSettings', function() { 66 test('openAdvancedFontSettings', function() {
67 cr.webUIListenerCallback('advanced-font-settings-installed', [true]); 67 cr.webUIListenerCallback('advanced-font-settings-installed', [true]);
68 Polymer.dom.flush(); 68 Polymer.dom.flush();
69 var button = fontsPage.$$('#advancedButton'); 69 var button = fontsPage.$$('#advancedButton');
70 assert(!!button); 70 assert(!!button);
71 MockInteractions.tap(button); 71 MockInteractions.tap(button);
72 return fontsBrowserProxy.whenCalled('openAdvancedFontSettings'); 72 return fontsBrowserProxy.whenCalled('openAdvancedFontSettings');
73 }); 73 });
74 }); 74 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698