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

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

Issue 1912483003: Expand the footer in the material design Clear Browsing Data dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the test. Created 4 years, 8 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_privacy_page', function() { 5 cr.define('settings_privacy_page', function() {
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @extends {TestBrowserProxy} 8 * @extends {TestBrowserProxy}
9 * @implements {settings.PrivacyPageBrowserProxy} 9 * @implements {settings.PrivacyPageBrowserProxy}
10 */ 10 */
11 function TestPrivacyPageBrowserProxy() { 11 function TestPrivacyPageBrowserProxy() {
12 settings.TestBrowserProxy.call(this, ['showManageSSLCertificates']); 12 settings.TestBrowserProxy.call(this, ['showManageSSLCertificates']);
13 } 13 }
14 14
15 TestPrivacyPageBrowserProxy.prototype = { 15 TestPrivacyPageBrowserProxy.prototype = {
16 __proto__: settings.TestBrowserProxy.prototype, 16 __proto__: settings.TestBrowserProxy.prototype,
17 17
18 /** @override */ 18 /** @override */
19 showManageSSLCertificates: function() { 19 showManageSSLCertificates: function() {
20 this.methodCalled('showManageSSLCertificates'); 20 this.methodCalled('showManageSSLCertificates');
21 }, 21 },
22 }; 22 };
23 23
24 /** 24 /**
25 * @constructor 25 * @constructor
26 * @extends {TestBrowserProxy} 26 * @extends {TestBrowserProxy}
27 * @implements {settings.ClearBrowsingDataBrowserProxy} 27 * @implements {settings.ClearBrowsingDataBrowserProxy}
28 */ 28 */
29 function TestClearBrowsingDataBrowserProxy() { 29 function TestClearBrowsingDataBrowserProxy() {
30 settings.TestBrowserProxy.call(this, ['clearBrowsingData']); 30 settings.TestBrowserProxy.call(this, ['clearBrowsingData']);
dschuyler 2016/04/26 17:29:49 I think this should have 'initializeFooter' added
msramek 2016/04/27 18:10:29 Done. Also fixed the missing this.methodCalled().
31 31
32 /** 32 /**
33 * The promise to return from |clearBrowsingData|. 33 * The promise to return from |clearBrowsingData|.
34 * Allows testing code to test what happens after the call is made, and 34 * Allows testing code to test what happens after the call is made, and
35 * before the browser responds. 35 * before the browser responds.
36 * @private {?Promise} 36 * @private {?Promise}
37 */ 37 */
38 this.clearBrowsingDataPromise_ = null; 38 this.clearBrowsingDataPromise_ = null;
39 } 39 }
40 40
41 TestClearBrowsingDataBrowserProxy.prototype = { 41 TestClearBrowsingDataBrowserProxy.prototype = {
42 __proto__: settings.TestBrowserProxy.prototype, 42 __proto__: settings.TestBrowserProxy.prototype,
43 43
44 /** @param {!Promise} promise */ 44 /** @param {!Promise} promise */
45 setClearBrowsingDataPromise: function(promise) { 45 setClearBrowsingDataPromise: function(promise) {
46 this.clearBrowsingDataPromise_ = promise; 46 this.clearBrowsingDataPromise_ = promise;
47 }, 47 },
48 48
49 /** @override */ 49 /** @override */
50 clearBrowsingData: function() { 50 clearBrowsingData: function() {
51 this.methodCalled('clearBrowsingData'); 51 this.methodCalled('clearBrowsingData');
52 return this.clearBrowsingDataPromise_ !== null ? 52 return this.clearBrowsingDataPromise_ !== null ?
53 this.clearBrowsingDataPromise_ : Promise.resolve(); 53 this.clearBrowsingDataPromise_ : Promise.resolve();
54 }, 54 },
55
56 /** @override */
57 initializeFooter: function() {},
55 }; 58 };
56 59
57 function registerNativeCertificateManagerTests() { 60 function registerNativeCertificateManagerTests() {
58 suite('NativeCertificateManager', function() { 61 suite('NativeCertificateManager', function() {
59 /** @type {settings.TestPrivacyPageBrowserProxy} */ 62 /** @type {settings.TestPrivacyPageBrowserProxy} */
60 var testBrowserProxy; 63 var testBrowserProxy;
61 64
62 /** @type {SettingsPrivacyPageElement} */ 65 /** @type {SettingsPrivacyPageElement} */
63 var page; 66 var page;
64 67
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 144
142 return { 145 return {
143 registerTests: function() { 146 registerTests: function() {
144 if (cr.isMac || cr.isWin) 147 if (cr.isMac || cr.isWin)
145 registerNativeCertificateManagerTests(); 148 registerNativeCertificateManagerTests();
146 149
147 registerClearBrowsingDataTests(); 150 registerClearBrowsingDataTests();
148 }, 151 },
149 }; 152 };
150 }); 153 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698