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

Unified Diff: remoting/webapp/crd/js/xmpp_login_handler_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: Migrate to assert 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 side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/crd/js/xmpp_login_handler_unittest.js
diff --git a/remoting/webapp/crd/js/xmpp_login_handler_unittest.js b/remoting/webapp/crd/js/xmpp_login_handler_unittest.js
index dfd1a61a3eb18536736f6582779288d96d0c1282..d06a847712893f3335e1619be99e607ec118eb8b 100644
--- a/remoting/webapp/crd/js/xmpp_login_handler_unittest.js
+++ b/remoting/webapp/crd/js/xmpp_login_handler_unittest.js
@@ -32,8 +32,8 @@ var onError = function(error, message) {};
/** @type {remoting.XmppLoginHandler} */
var loginHandler = null;
-module('XmppLoginHandler', {
- setup: function() {
+QUnit.module('XmppLoginHandler', {
+ beforeEach: function() {
sendMessage_spy = sinon.spy();
sendMessage = /** @type {function(string):void} */ (sendMessage_spy);
startTls_spy = sinon.spy();
@@ -85,7 +85,7 @@ function handshakeBase() {
'</stream:features>'));
}
-test('should authenticate', function() {
+QUnit.test('should authenticate', function() {
handshakeBase();
loginHandler.onDataReceived(
@@ -122,7 +122,7 @@ test('should authenticate', function() {
sinon.assert.calledWith(onHandshakeDone);
});
-test('use <starttls> handshake', function() {
+QUnit.test('use <starttls> handshake', function() {
loginHandler = new remoting.XmppLoginHandler(
'google.com', testUsername, testToken, true, sendMessage,
startTls, onHandshakeDone, onError);
@@ -155,8 +155,9 @@ test('use <starttls> handshake', function() {
sinon.assert.calledWith(startTls);
});
-test('should return AUTHENTICATION_FAILED error when failed to authenticate',
- function() {
+QUnit.test(
+ 'should return AUTHENTICATION_FAILED error when failed to authenticate',
+ function() {
handshakeBase();
loginHandler.onDataReceived(
@@ -166,7 +167,7 @@ test('should return AUTHENTICATION_FAILED error when failed to authenticate',
remoting.Error.Tag.AUTHENTICATION_FAILED));
});
-test('should return UNEXPECTED error when failed to parse stream',
+QUnit.test('should return UNEXPECTED error when failed to parse stream',
function() {
handshakeBase();
loginHandler.onDataReceived(
« no previous file with comments | « remoting/webapp/crd/js/xmpp_connection_unittest.js ('k') | remoting/webapp/crd/js/xmpp_stream_parser_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698