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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/editable_text_area_shadow_test.unitjs

Issue 549303004: Allow default font size changing on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win compile fix. Created 5 years, 4 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/renderer_preferences_util.cc ('k') | content/common/view_messages.h » ('j') | 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 // 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
(...skipping 30 matching lines...) Expand all
41 assertEquals(2, shadow.getLineIndex(5)); 41 assertEquals(2, shadow.getLineIndex(5));
42 assertEquals(2, shadow.getLineIndex(8)); 42 assertEquals(2, shadow.getLineIndex(8));
43 assertEquals(3, shadow.getLineIndex(9)); 43 assertEquals(3, shadow.getLineIndex(9));
44 assertEquals(4, shadow.getLineIndex(10)); 44 assertEquals(4, shadow.getLineIndex(10));
45 assertEquals(4, shadow.getLineIndex(14)); 45 assertEquals(4, shadow.getLineIndex(14));
46 }); 46 });
47 47
48 /** 48 /**
49 * Test the get line of a multiline textarea with wrapping instead of 49 * Test the get line of a multiline textarea with wrapping instead of
50 * explicit newlines. 50 * explicit newlines.
51 * Test disabled due to not being reliable if font size changes.
52 * See https://codereview.chromium.org/549303004/
51 */ 53 */
52 TEST_F('CvoxShadowUnitTest', 'MultilineWrap', function() { 54 TEST_F('CvoxShadowUnitTest', 'DISABLED_MultilineWrap', function() {
53 this.loadDoc(function() {/*! 55 this.loadDoc(function() {/*!
54 <div><textarea id="area" 56 <div><textarea id="area"
55 cols=4 rows=20>One two thr fou fiv six sev eig</textarea> 57 cols=4 rows=20>One two thr fou fiv six sev eig</textarea>
56 </div> */}); 58 </div> */});
57 59
58 var area = $('area'); 60 var area = $('area');
59 61
60 var shadow = new cvox.EditableTextAreaShadow(); 62 var shadow = new cvox.EditableTextAreaShadow();
61 shadow.update(area); 63 shadow.update(area);
62 for (var i = 0; i < 32; i++) { 64 for (var i = 0; i < 32; i++) {
63 assertEquals(Math.floor(i / 4), shadow.getLineIndex(i)); 65 assertEquals(Math.floor(i / 4), shadow.getLineIndex(i));
64 } 66 }
65 }); 67 });
OLDNEW
« no previous file with comments | « chrome/browser/renderer_preferences_util.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698