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

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

Issue 1099023005: Implement support for <audio> in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.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
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 GEN_INCLUDE(['../../testing/assert_additions.js']); 5 GEN_INCLUDE(['../../testing/assert_additions.js']);
6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']);
7 7
8 /** 8 /**
9 * Test fixture for output.js. 9 * Test fixture for output.js.
10 * @constructor 10 * @constructor
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 el = el.nextSibling; 131 el = el.nextSibling;
132 range = cursors.Range.fromNode(el); 132 range = cursors.Range.fromNode(el);
133 o = new Output().withSpeechAndBraille(range, null, 'navigate'); 133 o = new Output().withSpeechAndBraille(range, null, 'navigate');
134 assertEqualsJSON({string_: 'Heading 6f', 'spans_': [ 134 assertEqualsJSON({string_: 'Heading 6f', 'spans_': [
135 // Attributes. 135 // Attributes.
136 {value: 'name', start: 9, end: 10} 136 {value: 'name', start: 9, end: 10}
137 ]}, o.toSpannable()); 137 ]}, o.toSpannable());
138 }); 138 });
139 }); 139 });
140
141 TEST_F('OutputE2ETest', 'Audio', function() {
142 this.runWithLoadedTree('<audio src="foo.mp3" controls></audio>',
143 function(root) {
144 var el = root.firstChild.firstChild.firstChild.firstChild;
145 var range = cursors.Range.fromNode(el);
146 var o = new Output().withSpeechAndBraille(range, null, 'navigate');
147 assertEqualsJSON({string_: 'media control|Tool bar|||play|Button',
148 spans_:
149 // Entered container toolbar.
150
151 // Button.
152 [{value: 'name', start: 23, end: 23},
153 {value: 'value', start: 24, end: 24},
154 {value: 'description', start: 25, end: 29},
155 {value: 'role', start: 30, end: 36},
156
157 // Button earcon.
158 {value: {}, start: 30, end: 36}]
159 }, o.toSpannableForTest());
160
161 el = el.nextSibling;
162 var prevRange = range;
163 range = cursors.Range.fromNode(el);
164 var o = new Output().withSpeechAndBraille(range, prevRange, 'navigate');
165 assertEqualsJSON({string_: '0, , slider|audio time scrubber',
166 spans_:
167 [{value: 'help', start: 12, end: 31}]
168 }, o.toSpannableForTest());
169 });
170 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698