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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_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: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Include test fixture. 5 // Include test fixture.
6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']);
7 7
8 GEN_INCLUDE(['../../testing/mock_tts.js']); 8 GEN_INCLUDE(['../../testing/mock_tts.js']);
9 9
10 /** 10 /**
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return root; 76 return root;
77 } 77 }
78 for (var i = 0; i < root.children.length; i++) { 78 for (var i = 0; i < root.children.length; i++) {
79 var found = findStatusTray(root.children[i]); 79 var found = findStatusTray(root.children[i]);
80 if (found) 80 if (found)
81 return found; 81 return found;
82 } 82 }
83 return null; 83 return null;
84 } 84 }
85 85
86 chrome.automation.getDesktop(function(root) { 86 chrome.automation.getDesktop(this.continueTest(
87 var testButton = findStatusTray(root); 87 WhenTestDone.ASSERT,
88 cvox.ChromeVox.tts.expectSpeech('Status tray', testDone); 88 function(root) {
89 testButton.focus(); 89 var testButton = findStatusTray(root);
90 }); 90 cvox.ChromeVox.tts.expectSpeech('Status tray', testDone);
91 testButton.focus();
92 }));
91 }); 93 });
92 94
93 /** Tests feedback once a page loads. */ 95 /** Tests feedback once a page loads. */
94 TEST_F('BackgroundTest', 'InitialFeedback', function() { 96 TEST_F('BackgroundTest', 'InitialFeedback', function() {
95 cvox.ChromeVox.tts.expectSpeech('start', function() { 97 cvox.ChromeVox.tts.expectSpeech('start', function() {
96 global.backgroundObj.onGotCommand('nextLine'); 98 global.backgroundObj.onGotCommand('nextLine');
97 }, true); 99 }, true);
98 cvox.ChromeVox.tts.expectSpeech('end', testDone, true); 100 cvox.ChromeVox.tts.expectSpeech('end', testDone, true);
99 101
100 this.runWithDocument(function() {/*! 102 this.runWithDocument(function() {/*!
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 }.bind(this), 0); 193 }.bind(this), 0);
192 }.bind(cvox.ChromeVox.tts); 194 }.bind(cvox.ChromeVox.tts);
193 195
194 expect('start', doCmd('continuousRead')); 196 expect('start', doCmd('continuousRead'));
195 expect('alpha Link', sendEndEvent); 197 expect('alpha Link', sendEndEvent);
196 expect('beta Link', sendEndEvent); 198 expect('beta Link', sendEndEvent);
197 expect('Heading charlie', sendEndEvent); 199 expect('Heading charlie', sendEndEvent);
198 cvox.ChromeVox.tts.finishExpectations(); 200 cvox.ChromeVox.tts.finishExpectations();
199 }.bind(this)); 201 }.bind(this));
200 }); 202 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698