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

Side by Side Diff: chrome/browser/resources/options/personal_options.js

Issue 8503003: Seed test for SyncUI: sign in successfully with mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comments and moved gaia login to test. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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('options', function() { 5 cr.define('options', function() {
6 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 var ArrayDataModel = cr.ui.ArrayDataModel; 8 var ArrayDataModel = cr.ui.ArrayDataModel;
9 9
10 // State variables.
11 var syncEnabled = false;
12 var syncSetupCompleted = false;
13
14 /** 10 /**
15 * Encapsulated handling of personal options page. 11 * Encapsulated handling of personal options page.
16 * @constructor 12 * @constructor
17 */ 13 */
18 function PersonalOptions() { 14 function PersonalOptions() {
19 OptionsPage.call(this, 'personal', 15 OptionsPage.call(this, 'personal',
20 templateData.personalPageTabTitle, 16 templateData.personalPageTabTitle,
21 'personal-page'); 17 'personal-page');
22 if (cr.isChromeOS) { 18 if (cr.isChromeOS) {
23 // Email of the currently logged in user (or |kGuestUser|). 19 // Email of the currently logged in user (or |kGuestUser|).
24 this.userEmail_ = localStrings.getString('userEmail'); 20 this.userEmail_ = localStrings.getString('userEmail');
25 } 21 }
26 } 22 }
27 23
28 cr.addSingletonGetter(PersonalOptions); 24 cr.addSingletonGetter(PersonalOptions);
29 25
30 PersonalOptions.prototype = { 26 PersonalOptions.prototype = {
31 // Inherit PersonalOptions from OptionsPage. 27 // Inherit PersonalOptions from OptionsPage.
32 __proto__: options.OptionsPage.prototype, 28 __proto__: options.OptionsPage.prototype,
33 29
30 // State variables.
31 syncEnabled: false,
32 syncSetupCompleted: false,
33
34 // Initialize PersonalOptions page. 34 // Initialize PersonalOptions page.
35 initializePage: function() { 35 initializePage: function() {
36 // Call base class implementation to start preference initialization. 36 // Call base class implementation to start preference initialization.
37 OptionsPage.prototype.initializePage.call(this); 37 OptionsPage.prototype.initializePage.call(this);
38 38
39 var self = this; 39 var self = this;
40 40
41 // Sync. 41 // Sync.
42 $('sync-action-link').onclick = function(event) { 42 $('sync-action-link').onclick = function(event) {
43 SyncSetupOverlay.showErrorUI(); 43 SyncSetupOverlay.showErrorUI();
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 PersonalOptions.getInstance()[name + '_'](value); 352 PersonalOptions.getInstance()[name + '_'](value);
353 }; 353 };
354 }); 354 });
355 355
356 // Export 356 // Export
357 return { 357 return {
358 PersonalOptions: PersonalOptions 358 PersonalOptions: PersonalOptions
359 }; 359 };
360 360
361 }); 361 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/sync_setup_overlay.js » ('j') | chrome/browser/resources/sync_setup_overlay.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698