| 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();
|
| - });
|
| -});
|
|
|