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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/dom_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. 9 * Test fixture.
10 * @constructor 10 * @constructor
11 * @extends {ChromeVoxUnitTestBase} 11 * @extends {ChromeVoxUnitTestBase}
12 */ 12 */
13 function CvoxDomUtilUnitTest() {} 13 function CvoxDomUtilUnitTest() {}
14 14
15 CvoxDomUtilUnitTest.prototype = { 15 CvoxDomUtilUnitTest.prototype = {
16 __proto__: ChromeVoxUnitTestBase.prototype, 16 __proto__: ChromeVoxUnitTestBase.prototype,
17 17
18 /** @override */ 18 /** @override */
19 closureModuleDeps: [ 19 closureModuleDeps: [
20 'cvox.ChromeVox', 20 'cvox.ChromeVox',
21 'cvox.DescriptionUtil', 21 'cvox.DescriptionUtil',
22 'cvox.DomUtil', 22 'cvox.DomUtil',
23 'cvox.TestMsgs', 23 'TestMsgs',
24 ], 24 ],
25 25
26 /** @override */ 26 /** @override */
27 setUp: function() { 27 setUp: function() {
28 cvox.ChromeVox.msgs = new cvox.TestMsgs(); 28 Msgs = TestMsgs;
29 }, 29 },
30 30
31 asText_: function(node) { 31 asText_: function(node) {
32 var temp = document.createElement('div'); 32 var temp = document.createElement('div');
33 temp.appendChild(node); 33 temp.appendChild(node);
34 return temp.innerHTML; 34 return temp.innerHTML;
35 }, 35 },
36 36
37 assertEqualsAsText_: function(node1, node2) { 37 assertEqualsAsText_: function(node1, node2) {
38 assertEquals(this.asText_(node1), this.asText_(node2)); 38 assertEquals(this.asText_(node1), this.asText_(node2));
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 cvox.Memoize.scope(function() { 1569 cvox.Memoize.scope(function() {
1570 container.style.visibility = 'hidden'; 1570 container.style.visibility = 'hidden';
1571 assertFalse(cvox.DomUtil.isVisible(target)); 1571 assertFalse(cvox.DomUtil.isVisible(target));
1572 1572
1573 container.style.visibility = 'visible'; 1573 container.style.visibility = 'visible';
1574 // This should be true! It will return the wrong answer because 1574 // This should be true! It will return the wrong answer because
1575 // we're deliberately leaving memoization on while modifying the DOM. 1575 // we're deliberately leaving memoization on while modifying the DOM.
1576 assertFalse(cvox.DomUtil.isVisible(target)); 1576 assertFalse(cvox.DomUtil.isVisible(target));
1577 }); 1577 });
1578 }); 1578 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698