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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/walkers/structural_line_walker_test.unitjs

Issue 1362223003: Improve braille related message descriptions and clean up message handling in Chromevox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputtypeexception
Patch Set: Move another braille message to Msgs.Untranslated Created 5 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 // Include test fixture. 5 // Include test fixture.
6 GEN_INCLUDE(['../testing/chromevox_unittest_base.js']); 6 GEN_INCLUDE(['../testing/chromevox_unittest_base.js']);
7 7
8 /** 8 /**
9 * Test fixture. 9 * Test fixture.
10 * @constructor 10 * @constructor
11 * @extends {ChromeVoxUnitTestBase} 11 * @extends {ChromeVoxUnitTestBase}
12 */ 12 */
13 function CvoxStructuralLineWalkerUnitTest() {} 13 function CvoxStructuralLineWalkerUnitTest() {}
14 14
15 CvoxStructuralLineWalkerUnitTest.prototype = { 15 CvoxStructuralLineWalkerUnitTest.prototype = {
16 __proto__: ChromeVoxUnitTestBase.prototype, 16 __proto__: ChromeVoxUnitTestBase.prototype,
17 17
18 /** @override */ 18 /** @override */
19 closureModuleDeps: [ 19 closureModuleDeps: [
20 'cvox.StructuralLineWalker', 20 'cvox.StructuralLineWalker',
21 'cvox.TestMsgs', 21 'TestMsgs',
22 ], 22 ],
23 23
24 /** @override */ 24 /** @override */
25 setUp: function() { 25 setUp: function() {
26 this.loadDoc(function() {/*! 26 this.loadDoc(function() {/*!
27 <a id='1' href='google.com'>Click Here</a> 27 <a id='1' href='google.com'>Click Here</a>
28 <pre id='2'>This text will break 28 <pre id='2'>This text will break
29 immediately here! 29 immediately here!
30 <a href='google.com'>And here!</a> 30 <a href='google.com'>And here!</a>
31 </p> 31 </p>
32 */}); 32 */});
33 33
34 cvox.ChromeVox.msgs = new cvox.TestMsgs(); 34 Msgs = TestMsgs;
35 35
36 this.walker_ = new cvox.StructuralLineWalker(); 36 this.walker_ = new cvox.StructuralLineWalker();
37 }, 37 },
38 }; 38 };
39 39
40 TEST_F('CvoxStructuralLineWalkerUnitTest', 'BrailleLine', function() { 40 TEST_F('CvoxStructuralLineWalkerUnitTest', 'BrailleLine', function() {
41 var aLink = $('1'); 41 var aLink = $('1');
42 var aLinkSel1 = this.walker_.sync(cvox.CursorSelection.fromNode(aLink)); 42 var aLinkSel1 = this.walker_.sync(cvox.CursorSelection.fromNode(aLink));
43 assertEquals('Click Here lnk', 43 assertEquals('Click Here lnk',
44 this.walker_.getBraille(aLinkSel1, aLinkSel1).text.toString()); 44 this.walker_.getBraille(aLinkSel1, aLinkSel1).text.toString());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 assertEquals('1. orange', 114 assertEquals('1. orange',
115 this.walker_.getBraille(li1Sel, li1Sel).text.toString()); 115 this.walker_.getBraille(li1Sel, li1Sel).text.toString());
116 assertEquals('2. apple', 116 assertEquals('2. apple',
117 this.walker_.getBraille(li2Sel, li2Sel).text.toString()); 117 this.walker_.getBraille(li2Sel, li2Sel).text.toString());
118 assertEquals( 118 assertEquals(
119 '3. hi broken', 119 '3. hi broken',
120 this.walker_.getBraille(li3Sel, li3Sel).text.toString()); 120 this.walker_.getBraille(li3Sel, li3Sel).text.toString());
121 assertEquals('line here', 121 assertEquals('line here',
122 this.walker_.getBraille(li3SelNext, li3SelNext).text.toString()); 122 this.walker_.getBraille(li3SelNext, li3SelNext).text.toString());
123 }); 123 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698