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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs

Issue 1040863002: Revert "Enable chrome.automation.getDesktop on all aura platforms." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 SYNC_TEST_F('BackgroundTest', 'ClassicNamespaces', function() { 62 SYNC_TEST_F('BackgroundTest', 'ClassicNamespaces', function() {
63 assertEquals('object', typeof(cvox)); 63 assertEquals('object', typeof(cvox));
64 assertEquals('function', typeof(cvox.ChromeVoxBackground)); 64 assertEquals('function', typeof(cvox.ChromeVoxBackground));
65 }); 65 });
66 66
67 /** Tests that ChromeVox next is in this context. */ 67 /** Tests that ChromeVox next is in this context. */
68 SYNC_TEST_F('BackgroundTest', 'NextNamespaces', function() { 68 SYNC_TEST_F('BackgroundTest', 'NextNamespaces', function() {
69 assertEquals('function', typeof(Background)); 69 assertEquals('function', typeof(Background));
70 }); 70 });
71 71
72 /** Tests that ChromeVox reads the desktop tree. */
73 TEST_F('BackgroundTest', 'DesktopFocus', function() {
74 function findStatusTray(root) {
75 if (root.role == chrome.automation.RoleType.button &&
76 root.attributes.name &&
77 root.attributes.name.indexOf('Status tray') != -1) {
78 return root;
79 }
80 for (var i = 0; i < root.children.length; i++) {
81 var found = findStatusTray(root.children[i]);
82 if (found)
83 return found;
84 }
85 return null;
86 }
87
88 chrome.automation.getDesktop(this.newCallback(function(root) {
89 var testButton = findStatusTray(root);
90 cvox.ChromeVox.tts.expectSpeech('Status tray', this.newCallback());
91 testButton.focus();
92 }));
93 });
94
72 /** Tests feedback once a page loads. */ 95 /** Tests feedback once a page loads. */
73 TEST_F('BackgroundTest', 'MANUAL_InitialFeedback', function() { 96 TEST_F('BackgroundTest', 'MANUAL_InitialFeedback', function() {
74 cvox.ChromeVox.tts.expectSpeech('start', this.newCallback()); 97 cvox.ChromeVox.tts.expectSpeech('start', this.newCallback());
75 98
76 this.runWithTab(function() {/*! 99 this.runWithTab(function() {/*!
77 <p>start 100 <p>start
78 <p>end 101 <p>end
79 */}); 102 */});
80 }); 103 });
81 104
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 TEST_F('BackgroundTest', 'MANUAL_ContinuousRead', function() { 177 TEST_F('BackgroundTest', 'MANUAL_ContinuousRead', function() {
155 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { 178 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() {
156 cvox.ChromeVox.tts.expectSpeech('start'); 179 cvox.ChromeVox.tts.expectSpeech('start');
157 cvox.ChromeVox.tts.expectSpeechAfter('start', this.doCmd('continuousRead')); 180 cvox.ChromeVox.tts.expectSpeechAfter('start', this.doCmd('continuousRead'));
158 cvox.ChromeVox.tts.expectSpeech('alpha Link'); 181 cvox.ChromeVox.tts.expectSpeech('alpha Link');
159 cvox.ChromeVox.tts.expectSpeech('beta Link'); 182 cvox.ChromeVox.tts.expectSpeech('beta Link');
160 cvox.ChromeVox.tts.expectSpeech('Heading charlie', function() {}); 183 cvox.ChromeVox.tts.expectSpeech('Heading charlie', function() {});
161 cvox.ChromeVox.tts.finishExpectations(this.newCallback()); 184 cvox.ChromeVox.tts.finishExpectations(this.newCallback());
162 }); 185 });
163 }); 186 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698