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

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

Issue 955283002: Converted remoting.Error from an enum to a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 * 7 *
8 * Provides basic functionality for JavaScript based browser test. 8 * Provides basic functionality for JavaScript based browser test.
9 * 9 *
10 * To define a browser test, create a class under the browserTest namespace. 10 * To define a browser test, create a class under the browserTest namespace.
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 var CONNECT_PIN_WAIT = 500; 242 var CONNECT_PIN_WAIT = 500;
243 243
244 document.getElementById('pin-entry').value = pin; 244 document.getElementById('pin-entry').value = pin;
245 245
246 return base.Promise.sleep(CONNECT_PIN_WAIT).then(function() { 246 return base.Promise.sleep(CONNECT_PIN_WAIT).then(function() {
247 browserTest.clickOnControl('pin-connect-button'); 247 browserTest.clickOnControl('pin-connect-button');
248 }).then(function() { 248 }).then(function() {
249 if (opt_expectError) { 249 if (opt_expectError) {
250 return browserTest.expectConnectionError( 250 return browserTest.expectConnectionError(
251 remoting.DesktopConnectedView.Mode.ME2ME, 251 remoting.DesktopConnectedView.Mode.ME2ME,
252 remoting.Error.INVALID_ACCESS_CODE); 252 remoting.Error.Tag.INVALID_ACCESS_CODE);
253 } else { 253 } else {
254 return browserTest.expectConnected(); 254 return browserTest.expectConnected();
255 } 255 }
256 }); 256 });
257 }; 257 };
258 258
259 /** 259 /**
260 * @param {remoting.DesktopConnectedView.Mode} connectionMode 260 * @param {remoting.DesktopConnectedView.Mode} connectionMode
261 * @param {string} errorTag 261 * @param {string} errorTag
262 * @return {Promise} 262 * @return {Promise}
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 */ 428 */
429 browserTest.ensureRemoteConnectionEnabled = function(pin) { 429 browserTest.ensureRemoteConnectionEnabled = function(pin) {
430 browserTest.ensureHostStartedWithPIN(pin).then(function() { 430 browserTest.ensureHostStartedWithPIN(pin).then(function() {
431 browserTest.pass(); 431 browserTest.pass();
432 }, function(reason) { 432 }, function(reason) {
433 browserTest.fail(reason); 433 browserTest.fail(reason);
434 }); 434 });
435 }; 435 };
436 436
437 browserTest.init(); 437 browserTest.init();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698