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

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

Issue 2927653002: WebUI: Move test_browser_proxy.js one level up. (Closed)
Patch Set: Remove namespace 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 cr.define('settings_search', function() { 5 cr.define('settings_search', function() {
6 /** 6 /**
7 * A test version of SearchEnginesBrowserProxy. Provides helper methods 7 * A test version of SearchEnginesBrowserProxy. Provides helper methods
8 * for allowing tests to know when a method was called, as well as 8 * for allowing tests to know when a method was called, as well as
9 * specifying mock responses. 9 * specifying mock responses.
10 * 10 *
11 * @constructor 11 * @constructor
12 * @implements {settings.SearchEnginesBrowserProxy} 12 * @implements {settings.SearchEnginesBrowserProxy}
13 * @extends {settings.TestBrowserProxy} 13 * @extends {TestBrowserProxy}
14 */ 14 */
15 var TestSearchEnginesBrowserProxy = function() { 15 var TestSearchEnginesBrowserProxy = function() {
16 settings.TestBrowserProxy.call(this, [ 16 TestBrowserProxy.call(this, [
17 'getSearchEnginesList', 17 'getSearchEnginesList',
18 'removeSearchEngine', 18 'removeSearchEngine',
19 'searchEngineEditCancelled', 19 'searchEngineEditCancelled',
20 'searchEngineEditCompleted', 20 'searchEngineEditCompleted',
21 'searchEngineEditStarted', 21 'searchEngineEditStarted',
22 'setDefaultSearchEngine', 22 'setDefaultSearchEngine',
23 'validateSearchEngineInput', 23 'validateSearchEngineInput',
24 'getHotwordInfo', 24 'getHotwordInfo',
25 'setHotwordSearchEnabled', 25 'setHotwordSearchEnabled',
26 'getGoogleNowAvailability', 26 'getGoogleNowAvailability',
(...skipping 13 matching lines...) Expand all
40 errorMessage: '', 40 errorMessage: '',
41 userName: 'user@test.org', 41 userName: 'user@test.org',
42 historyEnabled: false, 42 historyEnabled: false,
43 }; 43 };
44 44
45 /** @type {boolean} */ 45 /** @type {boolean} */
46 this.googleNowAvailable = true; 46 this.googleNowAvailable = true;
47 }; 47 };
48 48
49 TestSearchEnginesBrowserProxy.prototype = { 49 TestSearchEnginesBrowserProxy.prototype = {
50 __proto__: settings.TestBrowserProxy.prototype, 50 __proto__: TestBrowserProxy.prototype,
51 51
52 /** @override */ 52 /** @override */
53 setDefaultSearchEngine: function(modelIndex) { 53 setDefaultSearchEngine: function(modelIndex) {
54 this.methodCalled('setDefaultSearchEngine', modelIndex); 54 this.methodCalled('setDefaultSearchEngine', modelIndex);
55 }, 55 },
56 56
57 /** @override */ 57 /** @override */
58 removeSearchEngine: function(modelIndex) { 58 removeSearchEngine: function(modelIndex) {
59 this.methodCalled('removeSearchEngine', modelIndex); 59 this.methodCalled('removeSearchEngine', modelIndex);
60 }, 60 },
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 url: "https://search.foo.com/search?p=%s", 145 url: "https://search.foo.com/search?p=%s",
146 urlLocked: false, 146 urlLocked: false,
147 }; 147 };
148 } 148 }
149 149
150 return { 150 return {
151 createSampleSearchEngine: createSampleSearchEngine, 151 createSampleSearchEngine: createSampleSearchEngine,
152 TestSearchEnginesBrowserProxy: TestSearchEnginesBrowserProxy, 152 TestSearchEnginesBrowserProxy: TestSearchEnginesBrowserProxy,
153 }; 153 };
154 }); 154 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698