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

Unified Diff: remoting/webapp/base/js/base_event_hook_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
« no previous file with comments | « no previous file | remoting/webapp/base/js/base_unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/base_event_hook_unittest.js
diff --git a/remoting/webapp/base/js/base_event_hook_unittest.js b/remoting/webapp/base/js/base_event_hook_unittest.js
index bbbc7ef2c7018c40adba713d49be0b653a92e348..d8523f70e9b0f2b3a97179faa06019cfbf569ee4 100644
--- a/remoting/webapp/base/js/base_event_hook_unittest.js
+++ b/remoting/webapp/base/js/base_event_hook_unittest.js
@@ -48,15 +48,15 @@ function raiseAllEvents() {
eventSource.raiseEvent('customEvent');
}
-module('base.EventHook', {
- setup: function() {
+QUnit.module('base.EventHook', {
+ beforeEach: function() {
domElement = /** @type {HTMLElement} */ (document.createElement('div'));
eventSource = new base.EventSourceImpl();
eventSource.defineEvents(['customEvent']);
myChromeEvent = new chromeMocks.Event();
listener = new Listener(domElement);
},
- tearDown: function() {
+ afterEach: function() {
domElement = null;
eventSource = null;
myChromeEvent = null;
@@ -64,7 +64,7 @@ module('base.EventHook', {
}
});
-test('EventHook should hook events when constructed', function() {
+QUnit.test('EventHook should hook events when constructed', function() {
raiseAllEvents();
sinon.assert.calledOnce(listener.onClickEvent);
sinon.assert.calledOnce(listener.onChromeEvent);
@@ -72,7 +72,7 @@ test('EventHook should hook events when constructed', function() {
listener.dispose();
});
-test('EventHook should unhook events when disposed', function() {
+QUnit.test('EventHook should unhook events when disposed', function() {
listener.dispose();
raiseAllEvents();
sinon.assert.notCalled(listener.onClickEvent);
« no previous file with comments | « no previous file | remoting/webapp/base/js/base_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698