| 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 /** | 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 Loading... |
| 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 {test.TestBrowserProxy} |
| 80 */ | 80 */ |
| 81 var TestSiteSettingsPrefsBrowserProxy = function() { | 81 var TestSiteSettingsPrefsBrowserProxy = function() { |
| 82 settings.TestBrowserProxy.call(this, [ | 82 test.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 Loading... |
| 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__: test.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 Loading... |
| 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 }; |
| OLD | NEW |