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

Side by Side Diff: chrome/test/data/webui/settings/people_page_test.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_people_page', function() { 5 cr.define('settings_people_page', function() {
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @implements {settings.ProfileInfoBrowserProxy} 8 * @implements {settings.ProfileInfoBrowserProxy}
9 * @extends {settings.TestBrowserProxy} 9 * @extends {TestBrowserProxy}
10 */ 10 */
11 var TestProfileInfoBrowserProxy = function() { 11 var TestProfileInfoBrowserProxy = function() {
12 settings.TestBrowserProxy.call(this, [ 12 TestBrowserProxy.call(this, [
13 'getProfileInfo', 13 'getProfileInfo',
14 'getProfileStatsCount', 14 'getProfileStatsCount',
15 'getProfileManagesSupervisedUsers', 15 'getProfileManagesSupervisedUsers',
16 ]); 16 ]);
17 17
18 this.fakeProfileInfo = { 18 this.fakeProfileInfo = {
19 name: 'fakeName', 19 name: 'fakeName',
20 iconUrl: 'http://fake-icon-url.com/', 20 iconUrl: 'http://fake-icon-url.com/',
21 }; 21 };
22 }; 22 };
23 23
24 TestProfileInfoBrowserProxy.prototype = { 24 TestProfileInfoBrowserProxy.prototype = {
25 __proto__: settings.TestBrowserProxy.prototype, 25 __proto__: TestBrowserProxy.prototype,
26 26
27 /** @override */ 27 /** @override */
28 getProfileInfo: function() { 28 getProfileInfo: function() {
29 this.methodCalled('getProfileInfo'); 29 this.methodCalled('getProfileInfo');
30 return Promise.resolve(this.fakeProfileInfo); 30 return Promise.resolve(this.fakeProfileInfo);
31 }, 31 },
32 32
33 /** @override */ 33 /** @override */
34 getProfileStatsCount: function() { 34 getProfileStatsCount: function() {
35 this.methodCalled('getProfileStatsCount'); 35 this.methodCalled('getProfileStatsCount');
36 }, 36 },
37 37
38 /** @override */ 38 /** @override */
39 getProfileManagesSupervisedUsers: function() { 39 getProfileManagesSupervisedUsers: function() {
40 this.methodCalled('getProfileManagesSupervisedUsers'); 40 this.methodCalled('getProfileManagesSupervisedUsers');
41 return Promise.resolve(false); 41 return Promise.resolve(false);
42 } 42 }
43 }; 43 };
44 44
45 /** 45 /**
46 * @constructor 46 * @constructor
47 * @implements {settings.SyncBrowserProxy} 47 * @implements {settings.SyncBrowserProxy}
48 * @extends {settings.TestBrowserProxy} 48 * @extends {TestBrowserProxy}
49 */ 49 */
50 var TestSyncBrowserProxy = function() { 50 var TestSyncBrowserProxy = function() {
51 settings.TestBrowserProxy.call(this, [ 51 TestBrowserProxy.call(this, [
52 'getSyncStatus', 52 'getSyncStatus',
53 'signOut', 53 'signOut',
54 ]); 54 ]);
55 }; 55 };
56 56
57 TestSyncBrowserProxy.prototype = { 57 TestSyncBrowserProxy.prototype = {
58 __proto__: settings.TestBrowserProxy.prototype, 58 __proto__: TestBrowserProxy.prototype,
59 59
60 /** @override */ 60 /** @override */
61 getSyncStatus: function() { 61 getSyncStatus: function() {
62 this.methodCalled('getSyncStatus'); 62 this.methodCalled('getSyncStatus');
63 return Promise.resolve({ 63 return Promise.resolve({
64 signedIn: true, 64 signedIn: true,
65 signedInUsername: 'fakeUsername' 65 signedInUsername: 'fakeUsername'
66 }); 66 });
67 }, 67 },
68 68
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 389 }
390 390
391 return { 391 return {
392 registerTests: function() { 392 registerTests: function() {
393 registerProfileInfoTests(); 393 registerProfileInfoTests();
394 if (!cr.isChromeOS) 394 if (!cr.isChromeOS)
395 registerSyncStatusTests(); 395 registerSyncStatusTests();
396 }, 396 },
397 }; 397 };
398 }); 398 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/people_page_sync_page_test.js ('k') | chrome/test/data/webui/settings/privacy_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698