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

Unified Diff: chrome/browser/resources/chromeos/chromevox/braille/braille_table_test.extjs

Issue 938623003: Fix ChromeVox next tests to fail instead of timing out where applicable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify async callback handling in the tests. 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 | chrome/browser/resources/chromeos/chromevox/braille/braille_translator_manager_test.extjs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/braille/braille_table_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/braille/braille_table_test.extjs b/chrome/browser/resources/chromeos/chromevox/braille/braille_table_test.extjs
index f62994124ec810d59b387a6d635baccb6f216e91..6adae04396520e97f67c113e5e21f9f73124c960 100644
--- a/chrome/browser/resources/chromeos/chromevox/braille/braille_table_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/braille/braille_table_test.extjs
@@ -13,7 +13,9 @@ GEN_INCLUDE(['../testing/chromevox_e2e_test_base.js',
* @constructor
* @extends {ChromeVoxE2ETest}
*/
-function CvoxBrailleTableTest() {}
+function CvoxBrailleTableTest() {
+ ChromeVoxE2ETest.call(this);
+}
CvoxBrailleTableTest.prototype = {
__proto__: ChromeVoxE2ETest.prototype,
@@ -24,7 +26,7 @@ CvoxBrailleTableTest.prototype = {
* NOTE: This will need to be adjusted when more tables are added.
*/
TEST_F('CvoxBrailleTableTest', 'testGetAllAndValidate', function() {
- cvox.BrailleTable.getAll(function(tables) {
+ cvox.BrailleTable.getAll(this.newCallback(function(tables) {
expectEquals(68, tables.length);
assertNotNullNorUndefined(
cvox.BrailleTable.forId(tables, 'en-US-g1'),
@@ -34,13 +36,12 @@ TEST_F('CvoxBrailleTableTest', 'testGetAllAndValidate', function() {
expectTrue(table.dots === '6' || table.dots === '8');
expectTrue(cvox.BrailleTable.getDisplayName(table).length > 0);
}
- testDone();
- });
+ }));
});
/** Tests getDisplayName for some specific representative cases. */
TEST_F('CvoxBrailleTableTest', 'testGetDisplayName', function() {
- cvox.BrailleTable.getAll(function(tables) {
+ cvox.BrailleTable.getAll(this.newCallback(function(tables) {
var table = cvox.BrailleTable.forId(tables, 'bg-comp8');
expectEquals('Bulgarian', cvox.BrailleTable.getDisplayName(table));
table = cvox.BrailleTable.forId(tables, 'ar-g1');
@@ -48,15 +49,14 @@ TEST_F('CvoxBrailleTableTest', 'testGetDisplayName', function() {
table = cvox.BrailleTable.forId(tables, 'en-UEB-g1');
expectEquals('English (UEB), Grade 1',
cvox.BrailleTable.getDisplayName(table));
- testDone();
- });
+ }));
});
/**
* Tests the getUncontracted function.
*/
TEST_F('CvoxBrailleTableTest', 'testGetUncontracted', function() {
- cvox.BrailleTable.getAll(function(tables) {
+ cvox.BrailleTable.getAll(this.newCallback(function(tables) {
function expectUncontracted(uncontractedId, idToCheck) {
var checkedTable = cvox.BrailleTable.forId(tables, idToCheck);
var uncontractedTable = cvox.BrailleTable.getUncontracted(
@@ -70,6 +70,5 @@ TEST_F('CvoxBrailleTableTest', 'testGetUncontracted', function() {
expectUncontracted('sv-comp8', 'sv-g1');
expectUncontracted('ar-g1', 'ar-g1');
expectUncontracted('de-comp8', 'de-CH-g2');
- testDone();
- });
+ }));
});
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/braille/braille_translator_manager_test.extjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698