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

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

Issue 1017613002: Migrate Remoting Webapp Unittests to use QUnit 2.0 syntax. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback 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', { 9 QUnit.module('error');
10 setup: function() {
11 },
12 teardown: function() {
13 }
14 });
15 10
16 QUnit.test('error constructor 1', function() { 11 QUnit.test('error constructor 1', function() {
17 var error = new remoting.Error(remoting.Error.Tag.HOST_OVERLOAD); 12 var error = new remoting.Error(remoting.Error.Tag.HOST_OVERLOAD);
18 QUnit.equal(error.getTag(), remoting.Error.Tag.HOST_OVERLOAD); 13 QUnit.equal(error.getTag(), remoting.Error.Tag.HOST_OVERLOAD);
19 QUnit.equal(error.toString(), remoting.Error.Tag.HOST_OVERLOAD); 14 QUnit.equal(error.toString(), remoting.Error.Tag.HOST_OVERLOAD);
20 }); 15 });
21 16
22 QUnit.test('error constructor 2', function() { 17 QUnit.test('error constructor 2', function() {
23 var error = new remoting.Error( 18 var error = new remoting.Error(
24 remoting.Error.Tag.HOST_IS_OFFLINE, 19 remoting.Error.Tag.HOST_IS_OFFLINE,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 var reportedError; 103 var reportedError;
109 var onError = function(/** !remoting.Error */ arg) { 104 var onError = function(/** !remoting.Error */ arg) {
110 reportedError = arg; 105 reportedError = arg;
111 }; 106 };
112 var origError = new remoting.Error(remoting.Error.Tag.HOST_IS_OFFLINE); 107 var origError = new remoting.Error(remoting.Error.Tag.HOST_IS_OFFLINE);
113 remoting.Error.handler(onError)(origError); 108 remoting.Error.handler(onError)(origError);
114 QUnit.equal(reportedError, origError); 109 QUnit.equal(reportedError, origError);
115 }); 110 });
116 111
117 })(); 112 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698