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_main_page', function() { | 5 cr.define('settings_main_page', function() { |
6 /** | 6 /** |
7 * Extending TestBrowserProxy even though SearchManager is not a browser proxy | 7 * Extending TestBrowserProxy even though SearchManager is not a browser proxy |
8 * itself. Essentially TestBrowserProxy can act as a "proxy" for any external | 8 * itself. Essentially TestBrowserProxy can act as a "proxy" for any external |
9 * dependency, not just "browser proxies" (and maybe should be renamed to | 9 * dependency, not just "browser proxies" (and maybe should be renamed to |
10 * TestProxy). | 10 * TestProxy). |
11 * | 11 * |
12 * @implements {SearchManager} | 12 * @implements {SearchManager} |
13 * @extends {settings.TestBrowserProxy} | 13 * @extends {test.TestBrowserProxy} |
14 */ | 14 */ |
15 var TestSearchManager = function() { | 15 var TestSearchManager = function() { |
16 settings.TestBrowserProxy.call(this, [ | 16 test.TestBrowserProxy.call(this, [ |
17 'search', | 17 'search', |
18 ]); | 18 ]); |
19 | 19 |
20 /** @private {boolean} */ | 20 /** @private {boolean} */ |
21 this.matchesFound_ = true; | 21 this.matchesFound_ = true; |
22 | 22 |
23 /** @private {?settings.SearchRequest} */ | 23 /** @private {?settings.SearchRequest} */ |
24 this.searchRequest_ = null; | 24 this.searchRequest_ = null; |
25 } | 25 } |
26 | 26 |
27 TestSearchManager.prototype = { | 27 TestSearchManager.prototype = { |
28 __proto__: settings.TestBrowserProxy.prototype, | 28 __proto__: test.TestBrowserProxy.prototype, |
29 | 29 |
30 /** | 30 /** |
31 * @param {boolean} matchesFound | 31 * @param {boolean} matchesFound |
32 */ | 32 */ |
33 setMatchesFound: function(matchesFound) { | 33 setMatchesFound: function(matchesFound) { |
34 this.matchesFound_ = matchesFound; | 34 this.matchesFound_ = matchesFound; |
35 }, | 35 }, |
36 | 36 |
37 /** @override */ | 37 /** @override */ |
38 search: function(text, page) { | 38 search: function(text, page) { |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 return assertPageVisibility('block', 'block'); | 285 return assertPageVisibility('block', 'block'); |
286 }); | 286 }); |
287 }); | 287 }); |
288 } | 288 } |
289 | 289 |
290 return { | 290 return { |
291 registerTests: registerTests, | 291 registerTests: registerTests, |
292 }; | 292 }; |
293 }); | 293 }); |
OLD | NEW |