Index: remoting/webapp/crd/js/l10n_unittest.js |
diff --git a/remoting/webapp/crd/js/l10n_unittest.js b/remoting/webapp/crd/js/l10n_unittest.js |
index 78ea48e2c36bf39d82d0e9daa700165e34daa97a..71ef1a20b5d485360b88d08e743545af677a0312 100644 |
--- a/remoting/webapp/crd/js/l10n_unittest.js |
+++ b/remoting/webapp/crd/js/l10n_unittest.js |
@@ -6,21 +6,21 @@ |
'use strict'; |
-module('l10n', { |
- setup: function() { |
+QUnit.module('l10n', { |
+ beforeEach: function() { |
sinon.stub(chrome.i18n, 'getMessage'); |
}, |
- teardown: function() { |
+ afterEach: function() { |
$testStub(chrome.i18n.getMessage).restore(); |
} |
}); |
-test('getTranslationOrError(tag) should return tag on error', function() { |
+QUnit.test('getTranslationOrError(tag) should return tag on error', function() { |
var translation = l10n.getTranslationOrError('non_existent_tag'); |
- equal(translation, 'non_existent_tag'); |
+ QUnit.equal(translation, 'non_existent_tag'); |
}); |
-test('localizeElementFromTag() should replace innerText by default', |
+QUnit.test('localizeElementFromTag() should replace innerText by default', |
function() { |
var element = document.createElement('div'); |
$testStub(chrome.i18n.getMessage).withArgs('tag') |
@@ -28,10 +28,10 @@ test('localizeElementFromTag() should replace innerText by default', |
l10n.localizeElementFromTag(element, 'tag'); |
- equal(element.innerHTML, '<b>Hello World</b>'); |
+ QUnit.equal(element.innerHTML, '<b>Hello World</b>'); |
}); |
-test('localizeElementFromTag() should replace innerHTML if flag is set', |
+QUnit.test('localizeElementFromTag() should replace innerHTML if flag is set', |
function() { |
var element = document.createElement('div'); |
$testStub(chrome.i18n.getMessage).withArgs('tag') |
@@ -39,10 +39,10 @@ test('localizeElementFromTag() should replace innerHTML if flag is set', |
l10n.localizeElementFromTag(element, 'tag', null, true); |
- equal(element.innerHTML, '<b>Hello World</b>'); |
+ QUnit.equal(element.innerHTML, '<b>Hello World</b>'); |
}); |
-test( |
+QUnit.test( |
'localizeElement() should replace innerText using the "i18n-content" ' + |
'attribute as the tag', |
function() { |
@@ -53,10 +53,10 @@ test( |
l10n.localizeElement(element); |
- equal(element.innerHTML, '<b>Hello World</b>'); |
+ QUnit.equal(element.innerHTML, '<b>Hello World</b>'); |
}); |
-test( |
+QUnit.test( |
'localize() should replace element title using the "i18n-title" ' + |
'attribute as the tag', |
function() { |
@@ -69,10 +69,10 @@ test( |
l10n.localize(); |
var target = document.querySelector('.target'); |
- equal(target.title, 'localized title'); |
+ QUnit.equal(target.title, 'localized title'); |
}); |
-test('localize() should support string substitutions', function() { |
+QUnit.test('localize() should support string substitutions', function() { |
var fixture = document.getElementById('qunit-fixture'); |
fixture.innerHTML = |
'<div class="target" ' + |
@@ -87,10 +87,10 @@ test('localize() should support string substitutions', function() { |
l10n.localize(); |
var target = document.querySelector('.target'); |
- equal(target.innerText, 'localized'); |
+ QUnit.equal(target.innerText, 'localized'); |
}); |
-test('localize() should support tag substitutions', function() { |
+QUnit.test('localize() should support tag substitutions', function() { |
var fixture = document.getElementById('qunit-fixture'); |
fixture.innerHTML = |
'<div class="target" i18n-content="tag"' + |
@@ -105,7 +105,7 @@ test('localize() should support tag substitutions', function() { |
l10n.localize(); |
var target = document.querySelector('.target'); |
- equal(target.innerText, 'localized'); |
+ QUnit.equal(target.innerText, 'localized'); |
}); |
})(); |