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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/aria_util_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 for aria_util.js. 9 * Test fixture for aria_util.js.
10 * @constructor 10 * @constructor
(...skipping 14 matching lines...) Expand all
25 TEST_F('CvoxAriaUtilUnitTest', 'GetStateGridWithActiveCell', function() { 25 TEST_F('CvoxAriaUtilUnitTest', 'GetStateGridWithActiveCell', function() {
26 this.loadDoc(function() {/*! 26 this.loadDoc(function() {/*!
27 <div id="grid" role="grid" aria-activedescendant="cell"> 27 <div id="grid" role="grid" aria-activedescendant="cell">
28 <div role="row"> 28 <div role="row">
29 <div id="cell" role="gridcell"> 29 <div id="cell" role="gridcell">
30 </div> 30 </div>
31 </div> 31 </div>
32 */}); 32 */});
33 assertThat( 33 assertThat(
34 cvox.AriaUtil.getStateMsgs($('grid'), true), 34 cvox.AriaUtil.getStateMsgs($('grid'), true),
35 eqJSON([['aria_role_gridcell_pos', 1, 1]])); 35 eqJSON([['role_gridcell_pos', 1, 1]]));
36 }); 36 });
37 37
38 TEST_F('CvoxAriaUtilUnitTest', 'GetActiveDescendant', function() { 38 TEST_F('CvoxAriaUtilUnitTest', 'GetActiveDescendant', function() {
39 this.loadDoc(function() {/*! 39 this.loadDoc(function() {/*!
40 <div id="top" aria-activedescendant="child"> 40 <div id="top" aria-activedescendant="child">
41 <div id="child" /> 41 <div id="child" />
42 </div> 42 </div>
43 <div id="top_2" aria-activedescendant="child_2"> 43 <div id="top_2" aria-activedescendant="child_2">
44 <div id="child_2" aria-activedescendant="grandchild_2"> 44 <div id="child_2" aria-activedescendant="grandchild_2">
45 <div id="grandchild_2" /> 45 <div id="grandchild_2" />
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 var outerLiveRegions = cvox.AriaUtil.getLiveRegions(outer); 133 var outerLiveRegions = cvox.AriaUtil.getLiveRegions(outer);
134 assertEquals(2, outerLiveRegions.length); 134 assertEquals(2, outerLiveRegions.length);
135 assertNotEquals(-1, outerLiveRegions.indexOf(progress)); 135 assertNotEquals(-1, outerLiveRegions.indexOf(progress));
136 assertNotEquals(-1, outerLiveRegions.indexOf(progress2)); 136 assertNotEquals(-1, outerLiveRegions.indexOf(progress2));
137 137
138 // getLiveRegions works walking up the tree as well. 138 // getLiveRegions works walking up the tree as well.
139 var ptextLiveRegions = cvox.AriaUtil.getLiveRegions(ptext); 139 var ptextLiveRegions = cvox.AriaUtil.getLiveRegions(ptext);
140 assertEquals(1, ptextLiveRegions.length); 140 assertEquals(1, ptextLiveRegions.length);
141 assertNotEquals(-1, ptextLiveRegions.indexOf(progress)); 141 assertNotEquals(-1, ptextLiveRegions.indexOf(progress));
142 }); 142 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698