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

Side by Side Diff: chrome/test/data/webui/settings/test_site_settings_prefs_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 /** 5 /**
6 * Only used for tests. 6 * Only used for tests.
7 * @typedef {{ 7 * @typedef {{
8 * auto_downloads: !Array<!RawSiteException>}, 8 * auto_downloads: !Array<!RawSiteException>},
9 * background_sync: !Array<!RawSiteException>}, 9 * background_sync: !Array<!RawSiteException>},
10 * camera: !Array<!RawSiteException>}, 10 * camera: !Array<!RawSiteException>},
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }, 69 },
70 }; 70 };
71 71
72 /** 72 /**
73 * A test version of SiteSettingsPrefsBrowserProxy. Provides helper methods 73 * A test version of SiteSettingsPrefsBrowserProxy. Provides helper methods
74 * for allowing tests to know when a method was called, as well as 74 * for allowing tests to know when a method was called, as well as
75 * specifying mock responses. 75 * specifying mock responses.
76 * 76 *
77 * @constructor 77 * @constructor
78 * @implements {settings.SiteSettingsPrefsBrowserProxy} 78 * @implements {settings.SiteSettingsPrefsBrowserProxy}
79 * @extends {settings.TestBrowserProxy} 79 * @extends {TestBrowserProxy}
80 */ 80 */
81 var TestSiteSettingsPrefsBrowserProxy = function() { 81 var TestSiteSettingsPrefsBrowserProxy = function() {
82 settings.TestBrowserProxy.call(this, [ 82 TestBrowserProxy.call(this, [
83 'fetchUsbDevices', 83 'fetchUsbDevices',
84 'fetchZoomLevels', 84 'fetchZoomLevels',
85 'getCookieDetails', 85 'getCookieDetails',
86 'getDefaultValueForContentType', 86 'getDefaultValueForContentType',
87 'getExceptionList', 87 'getExceptionList',
88 'isPatternValid', 88 'isPatternValid',
89 'observeProtocolHandlers', 89 'observeProtocolHandlers',
90 'observeProtocolHandlersEnabledState', 90 'observeProtocolHandlersEnabledState',
91 'reloadCookies', 91 'reloadCookies',
92 'removeCookie', 92 'removeCookie',
(...skipping 23 matching lines...) Expand all
116 this.protocolHandlers_ = []; 116 this.protocolHandlers_ = [];
117 117
118 /** @private {?CookieList} */ 118 /** @private {?CookieList} */
119 this.cookieDetails_ = null; 119 this.cookieDetails_ = null;
120 120
121 /** @private {boolean} */ 121 /** @private {boolean} */
122 this.isPatternValid_ = true; 122 this.isPatternValid_ = true;
123 }; 123 };
124 124
125 TestSiteSettingsPrefsBrowserProxy.prototype = { 125 TestSiteSettingsPrefsBrowserProxy.prototype = {
126 __proto__: settings.TestBrowserProxy.prototype, 126 __proto__: TestBrowserProxy.prototype,
127 127
128 /** 128 /**
129 * Pretends an incognito session started or ended. 129 * Pretends an incognito session started or ended.
130 * @param {boolean} hasIncognito True for session started. 130 * @param {boolean} hasIncognito True for session started.
131 */ 131 */
132 setIncognito: function(hasIncognito) { 132 setIncognito: function(hasIncognito) {
133 this.hasIncognito_ = hasIncognito; 133 this.hasIncognito_ = hasIncognito;
134 cr.webUIListenerCallback('onIncognitoStatusChanged', hasIncognito); 134 cr.webUIListenerCallback('onIncognitoStatusChanged', hasIncognito);
135 }, 135 },
136 136
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 /** @override */ 375 /** @override */
376 removeProtocolHandler: function() { 376 removeProtocolHandler: function() {
377 this.methodCalled('removeProtocolHandler', arguments); 377 this.methodCalled('removeProtocolHandler', arguments);
378 }, 378 },
379 379
380 /** @override */ 380 /** @override */
381 updateIncognitoStatus: function() { 381 updateIncognitoStatus: function() {
382 this.methodCalled('updateIncognitoStatus', arguments); 382 this.methodCalled('updateIncognitoStatus', arguments);
383 } 383 }
384 }; 384 };
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/test_search_engines_browser_proxy.js ('k') | chrome/test/data/webui/test_browser_proxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698