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

Side by Side Diff: remoting/webapp/crd/js/error_unittest.js

Issue 1003433002: Updated remoting.xhr API to use promises. Removed access to the native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spy-promise
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 (function() { 5 (function() {
6 6
7 'use strict'; 7 'use strict';
8 8
9 QUnit.module('error', {
10 setup: function() {
11 },
12 teardown: function() {
13 }
14 });
Jamie 2015/03/18 22:16:16 This looks like a rebase error.
John Williams 2015/03/19 20:19:42 Done.
9 QUnit.module('error'); 15 QUnit.module('error');
10 16
11 QUnit.test('error constructor 1', function(assert) { 17 QUnit.test('error constructor 1', function(assert) {
12 var error = new remoting.Error(remoting.Error.Tag.HOST_OVERLOAD); 18 var error = new remoting.Error(remoting.Error.Tag.HOST_OVERLOAD);
13 assert.equal(error.getTag(), remoting.Error.Tag.HOST_OVERLOAD); 19 assert.equal(error.getTag(), remoting.Error.Tag.HOST_OVERLOAD);
14 assert.equal(error.toString(), remoting.Error.Tag.HOST_OVERLOAD); 20 assert.equal(error.toString(), remoting.Error.Tag.HOST_OVERLOAD);
15 }); 21 });
16 22
17 QUnit.test('error constructor 2', function(assert) { 23 QUnit.test('error constructor 2', function(assert) {
18 var error = new remoting.Error( 24 var error = new remoting.Error(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 var reportedError; 109 var reportedError;
104 var onError = function(/** !remoting.Error */ arg) { 110 var onError = function(/** !remoting.Error */ arg) {
105 reportedError = arg; 111 reportedError = arg;
106 }; 112 };
107 var origError = new remoting.Error(remoting.Error.Tag.HOST_IS_OFFLINE); 113 var origError = new remoting.Error(remoting.Error.Tag.HOST_IS_OFFLINE);
108 remoting.Error.handler(onError)(origError); 114 remoting.Error.handler(onError)(origError);
109 assert.equal(reportedError, origError); 115 assert.equal(reportedError, origError);
110 }); 116 });
111 117
112 })(); 118 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698