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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.js

Issue 13542003: Add browser test for new user CrOS login flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * @fileoverview Oobe signin screen implementation. 6 * @fileoverview Oobe signin screen implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 // Gaia loading time after which error message must be displayed and 10 // Gaia loading time after which error message must be displayed and
11 // lazy portal check should be fired. 11 // lazy portal check should be fired.
12 /** @const */ var GAIA_LOADING_PORTAL_SUSSPECT_TIME_SEC = 7; 12 /** @const */ var GAIA_LOADING_PORTAL_SUSSPECT_TIME_SEC = 15;
13 13
14 // Maximum Gaia loading time in seconds. 14 // Maximum Gaia loading time in seconds.
15 /** @const */ var MAX_GAIA_LOADING_TIME_SEC = 60; 15 /** @const */ var MAX_GAIA_LOADING_TIME_SEC = 60;
16 16
17 // Frame loading errors. 17 // Frame loading errors.
18 /** @const */ var NET_ERROR = { 18 /** @const */ var NET_ERROR = {
19 ABORTED_BY_USER: 3 19 ABORTED_BY_USER: 3
20 }; 20 };
21 21
22 /** 22 /**
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (data.test_email) 224 if (data.test_email)
225 params.push('test_email=' + encodeURIComponent(data.test_email)); 225 params.push('test_email=' + encodeURIComponent(data.test_email));
226 if (data.test_password) 226 if (data.test_password)
227 params.push('test_password=' + encodeURIComponent(data.test_password)); 227 params.push('test_password=' + encodeURIComponent(data.test_password));
228 228
229 var url = data.startUrl; 229 var url = data.startUrl;
230 if (params.length) 230 if (params.length)
231 url += '?' + params.join('&'); 231 url += '?' + params.join('&');
232 232
233 if (data.forceReload || this.extensionUrl_ != url) { 233 if (data.forceReload || this.extensionUrl_ != url) {
234 console.log('Opening extension: ' + data.url + 234 console.log('Opening extension: ' + url +
235 ', opt_email=' + data.email); 235 ', opt_email=' + data.email);
236 236
237 this.error_ = 0; 237 this.error_ = 0;
238 this.frame_.src = url; 238 this.frame_.src = url;
239 this.extensionUrl_ = url; 239 this.extensionUrl_ = url;
240 240
241 this.loading = true; 241 this.loading = true;
242 this.startLoadingTimer_(); 242 this.startLoadingTimer_();
243 } else if (this.loading) { 243 } else if (this.loading) {
244 if (this.error_) { 244 if (this.error_) {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // Check current network state if currentScreen is a Gaia signin. 489 // Check current network state if currentScreen is a Gaia signin.
490 var currentScreen = Oobe.getInstance().currentScreen; 490 var currentScreen = Oobe.getInstance().currentScreen;
491 if (currentScreen.id == SCREEN_GAIA_SIGNIN) 491 if (currentScreen.id == SCREEN_GAIA_SIGNIN)
492 chrome.send('showGaiaFrameError', [error]); 492 chrome.send('showGaiaFrameError', [error]);
493 }; 493 };
494 494
495 return { 495 return {
496 GaiaSigninScreen: GaiaSigninScreen 496 GaiaSigninScreen: GaiaSigninScreen
497 }; 497 };
498 }); 498 });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_master.cc ('k') | chrome/browser/resources/gaia_auth/manifest_test.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698