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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/testing/spoken_list_builder.js

Issue 582123002: Port live region ChromeVox tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromevox_keyboard_tests_again
Patch Set: Improve comments in chromevox_unittest_base Created 6 years, 2 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/testing/chromevox_unittest_base.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview The spoken list builder. Used in test cases.
7 */
8
9 goog.provide('cvox.SpokenListBuilder');
10
11
12
13 /**
14 * Builds a spoken list.
15 * @constructor
16 */
17 cvox.SpokenListBuilder = function() {
18 this.list_ = [];
19 };
20
21
22 /**
23 * Adds an expected flushed utterance to the builder.
24 * @param {string} expectedText The expected text.
25 * @return {cvox.SpokenListBuilder} this.
26 */
27 cvox.SpokenListBuilder.prototype.flush = function(expectedText) {
28 this.list_.push([expectedText, cvox.AbstractTts.QUEUE_MODE_FLUSH]);
29 return this; // for chaining
30 };
31
32
33 /**
34 * Adds an expected queued utterance to the builder.
35 * @param {string} expectedText The expected text.
36 * @return {cvox.SpokenListBuilder} this.
37 */
38 cvox.SpokenListBuilder.prototype.queue = function(expectedText) {
39 this.list_.push([expectedText, cvox.AbstractTts.QUEUE_MODE_QUEUE]);
40 return this; // for chaining
41 };
42
43
44 /**
45 * Adds an expected category-flush utterance to the builder.
46 * @param {string} expectedText The expected text.
47 * @return {cvox.SpokenListBuilder} this.
48 */
49 cvox.SpokenListBuilder.prototype.categoryFlush = function(expectedText) {
50 this.list_.push([expectedText, cvox.AbstractTts.QUEUE_MODE_CATEGORY_FLUSH]);
51 return this; // for chaining
52 };
53
54
55 /**
56 * Builds the list.
57 * @return {Array} The array of utterances.
58 */
59 cvox.SpokenListBuilder.prototype.build = function() {
60 return this.list_;
61 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/testing/chromevox_unittest_base.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698