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

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_manager_test.unitjs

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
Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_manager_test.unitjs
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_manager_test.unitjs b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_manager_test.unitjs
index 3af5bd2bdade9436c738c075e051678b57b215f0..c2e47233c23a4875e6b11352738ed5d0aab5c37d 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_manager_test.unitjs
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/navigation_manager_test.unitjs
@@ -10,7 +10,9 @@ GEN_INCLUDE(['../../testing/chromevox_unittest_base.js']);
* @constructor
* @extends {ChromeVoxUnitTestBase}
*/
-function CvoxNavigationManagerUnitTest() {}
+function CvoxNavigationManagerUnitTest() {
+ ChromeVoxUnitTestBase.call(this);
+}
CvoxNavigationManagerUnitTest.prototype = {
__proto__: ChromeVoxUnitTestBase.prototype,
@@ -47,7 +49,7 @@ CvoxNavigationManagerUnitTest.prototype = {
*/
checkNavSequence: function(strategies, commandsAndExpectations) {
if (strategies.length == 0)
- testDone();
+ return;
var strategy = strategies.shift();
this.waitForCalm(cvox.ChromeVoxTester.setStrategy, strategy)
@@ -322,7 +324,6 @@ TEST_F('CvoxNavigationManagerUnitTest', 'FindNextHeading', function() {
this.waitForCalm(this.userCommand, 'backward');
this.waitForCalm(this.assertSpoken, 'Some text.');
- this.waitForCalm(testDone);
});
@@ -1266,8 +1267,7 @@ TEST_F('CvoxNavigationManagerUnitTest', 'ContinuousReading', function() {
.waitForCalm(cvox.ChromeVoxTester.syncToFirstNode)
.waitForCalm(cvox.ChromeVoxTester.readFromHere)
.waitForCalm(this.assertSpoken,
- 'Before Some text. First Second Third Internal link After')
- .waitForCalm(testDone);
+ 'Before Some text. First Second Third Internal link After');
});
@@ -1391,6 +1391,5 @@ TEST_F('CvoxNavigationManagerUnitTest', 'AriaMathRoles', function() {
this.waitForCalm(this.userCommand, 'forward')
.waitForCalm(this.assertSpoken, 'Math a times x squared plus b times x plus c equals 0')
.waitForCalm(this.userCommand, 'forward')
- .waitForCalm(this.assertSpoken, 'Math square root of n cube')
- .waitForCalm(testDone);
+ .waitForCalm(this.assertSpoken, 'Math square root of n cube');
});

Powered by Google App Engine
This is Rietveld 408576698