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

Side by Side Diff: remoting/webapp/browser_test/cancel_pin_browser_test.js

Issue 927373005: [Chromoting] Enable jscompile for browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 6 * @fileoverview
7 * @suppress {checkTypes} 7 * @suppress {checkTypes}
8 * Browser test for the scenario below: 8 * Browser test for the scenario below:
9 * 1. Attempt to connect. 9 * 1. Attempt to connect.
10 * 2. Hit cancel at the PIN prompt. 10 * 2. Hit cancel at the PIN prompt.
11 * 3. Reconnect with the PIN. 11 * 3. Reconnect with the PIN.
12 * 4. Verify that the session is connected. 12 * 4. Verify that the session is connected.
13 */ 13 */
14 14
15 'use strict'; 15 'use strict';
16 16
17 /** @constructor */ 17 /** @constructor */
18 browserTest.Cancel_PIN = function() {}; 18 browserTest.Cancel_PIN = function() {};
19 19
20 /**
21 * @param {{pin: string, accessCode: string}} data
kelvinp 2015/02/18 18:41:29 s/{{pin: string, accessCode: string}}/{{pin:string
garykac 2015/02/19 01:48:45 Done.
22 */
20 browserTest.Cancel_PIN.prototype.run = function(data) { 23 browserTest.Cancel_PIN.prototype.run = function(data) {
21 browserTest.expect(typeof data.pin == 'string'); 24 browserTest.expect(typeof data.pin == 'string');
22 25
23 var AppMode = remoting.AppMode; 26 var AppMode = remoting.AppMode;
24 browserTest.connectMe2Me().then(function() { 27 browserTest.connectMe2Me().then(function() {
25 browserTest.clickOnControl('cancel-pin-entry-button'); 28 browserTest.clickOnControl('cancel-pin-entry-button');
26 return browserTest.onUIMode(AppMode.HOME); 29 return browserTest.onUIMode(AppMode.HOME);
27 }).then(function() { 30 }).then(function() {
28 return browserTest.connectMe2Me() 31 return browserTest.connectMe2Me()
29 }).then(function() { 32 }).then(function() {
30 return browserTest.enterPIN(data.pin) 33 return browserTest.enterPIN(data.pin)
31 }).then(function() { 34 }).then(function() {
32 // On fulfilled. 35 // On fulfilled.
33 browserTest.pass(); 36 browserTest.pass();
34 }, function(reason) { 37 }, function(reason) {
35 // On rejected. 38 // On rejected.
36 browserTest.fail(reason); 39 browserTest.fail(reason);
37 }); 40 });
38 }; 41 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698