Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 })(); |
| OLD | NEW |