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

Unified Diff: chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs

Issue 584313003: Enable runtime switching between ChromeVox and ChromeVox next via command line. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make changes to exclude files/paths from webstore release. Created 6 years, 3 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/chromevox2/cvox2/background/background.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs b/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
deleted file mode 100644
index 74abf72bf972b11e7f06d1af5494fb2e6cece00b..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Include test fixture.
-GEN_INCLUDE(['../../../chromevox/testing/chromevox_e2e_test_base.js']);
-
-/**
- * Test fixture for cvox2.Background.
- * @constructor
- * @extends {ChromeVoxE2ETest}
- */
-function BackgroundTest() {}
-
-BackgroundTest.prototype = {
- __proto__: ChromeVoxE2ETest.prototype,
-
- /** @override */
- setUp: function() {
- this.mockTts = new MockTts();
- cvox.ChromeVox.tts = this.mockTts;
- }
-};
-
-/**
- * Mock tts class.
- * @constructor
- * @extends {cvox.TtsInterface}
- */
-var MockTts = function() {
-};
-
-MockTts.prototype = {
- /** Tracks all spoken text. @type {!Array.<string>} */
- utterances: [],
-
- /** @override */
- speak: function(textString, queueMode, properties) {
- this.utterances.push(textString);
- },
-
- /**
- * Checks to see if a string was spoken.
- * @param {string} textString The string to check.
- * @return {boolean} True if the string was spoken (possibly as part of a
- * larger utterance).
- */
- checkIfSubstringWasSpoken: function(textString) {
- return this.utterances.some(function(t) {
- return t.indexOf(textString) != -1;
- });
- }
-};
-
-/** Tests that ChromeVox classic is in this context. */
-SYNC_TEST_F('BackgroundTest', 'ClassicNamespaces', function() {
- assertEquals('object', typeof(cvox));
- assertEquals('function', typeof(cvox.ChromeVoxBackground));
-});
-
-/** Tests that ChromeVox next is in this context. */
-SYNC_TEST_F('BackgroundTest', 'NextNamespaces', function() {
- assertEquals('object', typeof(cvox2));
- assertEquals('function', typeof(cvox2.Background));
-});
-
-/** Tests that ChromeVox reads the desktop tree. */
-TEST_F('BackgroundTest', 'DesktopFocus', function() {
- function findStatusTray(root) {
- if (root.role == chrome.automation.RoleType.button &&
- root.attributes.name &&
- root.attributes.name.indexOf('Status tray') != -1) {
- return root;
- }
- for (var i = 0; i < root.children().length; i++) {
- var found = findStatusTray(root.children()[i]);
- if (found)
- return found;
- }
- return null;
- }
-
- chrome.automation.getDesktop(function(root) {
- var testButton = findStatusTray(root);
- testButton.addEventListener(chrome.automation.EventType.focus,
- function(e) {
- var result =
- cvox.ChromeVox.tts.checkIfSubstringWasSpoken('Status tray');
- testDone([result, '']);
- },
- true);
- testButton.focus();
- });
-});

Powered by Google App Engine
This is Rietveld 408576698