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

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

Issue 604423002: Use an enum for ChromeVox queue mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 goog.provide('cvox.ChromeVoxTester'); 5 goog.provide('cvox.ChromeVoxTester');
6 6
7 goog.require('cvox.AbstractBraille'); 7 goog.require('cvox.AbstractBraille');
8 goog.require('cvox.AbstractEarcons'); 8 goog.require('cvox.AbstractEarcons');
9 goog.require('cvox.ChromeVoxEventWatcher'); 9 goog.require('cvox.ChromeVoxEventWatcher');
10 goog.require('cvox.ChromeVoxUserCommands'); 10 goog.require('cvox.ChromeVoxUserCommands');
(...skipping 30 matching lines...) Expand all
41 41
42 cvox.ChromeVox.braille = new cvox.AbstractBraille(); 42 cvox.ChromeVox.braille = new cvox.AbstractBraille();
43 cvox.ChromeVox.braille.write = function(params) {}; 43 cvox.ChromeVox.braille.write = function(params) {};
44 44
45 cvox.ChromeVox.msgs = new cvox.TestMsgs(); 45 cvox.ChromeVox.msgs = new cvox.TestMsgs();
46 46
47 cvox.ChromeVox.host = new cvox.TestHost(); 47 cvox.ChromeVox.host = new cvox.TestHost();
48 48
49 // Init LiveRegions with a date of 0 so that the initial delay before 49 // Init LiveRegions with a date of 0 so that the initial delay before
50 // things is spoken is skipped. 50 // things is spoken is skipped.
51 cvox.LiveRegions.init(new Date(0), cvox.AbstractTts.QUEUE_MODE_QUEUE, false); 51 cvox.LiveRegions.init(new Date(0), cvox.QueueMode.QUEUE, false);
52 52
53 cvox.ChromeVoxEventWatcher.init(doc); 53 cvox.ChromeVoxEventWatcher.init(doc);
54 window.console.log('done setup'); 54 window.console.log('done setup');
55 }; 55 };
56 56
57 /** 57 /**
58 * Tears down cvox.ChromeVoxTester. 58 * Tears down cvox.ChromeVoxTester.
59 * @param {!Document} doc The DOM document where event listeners were added. 59 * @param {!Document} doc The DOM document where event listeners were added.
60 */ 60 */
61 cvox.ChromeVoxTester.tearDown = function(doc) { 61 cvox.ChromeVoxTester.tearDown = function(doc) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 cvox.ChromeVox.navigationManager.ensureNotSubnavigating(); 108 cvox.ChromeVox.navigationManager.ensureNotSubnavigating();
109 cvox.ChromeVox.navigationManager.setGranularity( 109 cvox.ChromeVox.navigationManager.setGranularity(
110 cvox.ChromeVoxTester.STRATEGY_MAP[strategy]); 110 cvox.ChromeVoxTester.STRATEGY_MAP[strategy]);
111 }; 111 };
112 112
113 /** 113 /**
114 * Starts reading the page from the current node. 114 * Starts reading the page from the current node.
115 */ 115 */
116 cvox.ChromeVoxTester.readFromHere = function() { 116 cvox.ChromeVoxTester.readFromHere = function() {
117 cvox.ChromeVox.navigationManager.startReading( 117 cvox.ChromeVox.navigationManager.startReading(
118 cvox.AbstractTts.QUEUE_MODE_FLUSH); 118 cvox.QueueMode.FLUSH);
119 }; 119 };
120 120
121 /** 121 /**
122 * Syncs to the given node in the test HTML 122 * Syncs to the given node in the test HTML
123 * @param {Node} node The node to sync to. 123 * @param {Node} node The node to sync to.
124 */ 124 */
125 cvox.ChromeVoxTester.syncToNode = function(node) { 125 cvox.ChromeVoxTester.syncToNode = function(node) {
126 cvox.ChromeVox.navigationManager 126 cvox.ChromeVox.navigationManager
127 .updateSel(cvox.CursorSelection.fromNode(node)); 127 .updateSel(cvox.CursorSelection.fromNode(node));
128 cvox.ChromeVox.navigationManager.sync(); 128 cvox.ChromeVox.navigationManager.sync();
129 }; 129 };
130 130
131 /** 131 /**
132 * Syncs to the first node in the test. 132 * Syncs to the first node in the test.
133 */ 133 */
134 cvox.ChromeVoxTester.syncToFirstNode = function() { 134 cvox.ChromeVoxTester.syncToFirstNode = function() {
135 cvox.ChromeVox.navigationManager.updateSel(cvox.CursorSelection.fromBody()); 135 cvox.ChromeVox.navigationManager.updateSel(cvox.CursorSelection.fromBody());
136 cvox.ChromeVox.navigationManager.sync(); 136 cvox.ChromeVox.navigationManager.sync();
137 }; 137 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698