OLD | NEW |
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 this.line3Text = | 57 this.line3Text = |
58 'Braille also benefits greatly from this type of formatting since ' + | 58 'Braille also benefits greatly from this type of formatting since ' + |
59 'some displays can handle lots of text like 80 cell displays!'; | 59 'some displays can handle lots of text like 80 cell displays!'; |
60 | 60 |
61 this.line1Description = | 61 this.line1Description = |
62 [{'context': '', 'text': 'Demonstrating that in-line links like', | 62 [{'context': '', 'text': 'Demonstrating that in-line links like', |
63 'userValue': '', 'annotation': '', 'earcons': [], 'personality': null, | 63 'userValue': '', 'annotation': '', 'earcons': [], 'personality': null, |
64 'hint': '', 'category': null}, | 64 'hint': '', 'category': null}, |
65 {'context': '', 'text': 'google', 'userValue': '', 'annotation': 'Link'
, | 65 {'context': '', 'text': 'google', 'userValue': '', 'annotation': 'Link'
, |
66 'earcons': [cvox.AbstractEarcons.LINK], 'personality': null, | 66 'earcons': [cvox.Earcon.LINK], 'personality': null, |
67 hint: '', 'category': null}, | 67 hint: '', 'category': null}, |
68 {'context': '', 'text': 'are considered a single layout line.', | 68 {'context': '', 'text': 'are considered a single layout line.', |
69 'userValue': '', 'annotation': '', 'earcons': [], 'personality': null, | 69 'userValue': '', 'annotation': '', 'earcons': [], 'personality': null, |
70 'hint': '', 'category': null}]; | 70 'hint': '', 'category': null}]; |
71 | 71 |
72 this.line2Description = | 72 this.line2Description = |
73 [{'context': '', 'text': | 73 [{'context': '', 'text': |
74 'This includes a paragraph that has a lot of text like this one.', | 74 'This includes a paragraph that has a lot of text like this one.', |
75 'userValue': '', 'annotation': '', 'earcons': [], 'personality': null, | 75 'userValue': '', 'annotation': '', 'earcons': [], 'personality': null, |
76 'hint': '', 'category': null}, | 76 'hint': '', 'category': null}, |
77 {'context': '', | 77 {'context': '', |
78 'text': 'Wikipedia', | 78 'text': 'Wikipedia', |
79 'userValue': '', | 79 'userValue': '', |
80 'annotation': 'Link', | 80 'annotation': 'Link', |
81 'earcons': [cvox.AbstractEarcons.LINK], | 81 'earcons': [cvox.Earcon.LINK], |
82 'personality': null, | 82 'personality': null, |
83 'hint': '', 'category': null}, | 83 'hint': '', 'category': null}, |
84 {'context': '', 'text': | 84 {'context': '', 'text': |
85 'is a great example of a site that this walker becomes valuable.', | 85 'is a great example of a site that this walker becomes valuable.', |
86 'userValue': '', | 86 'userValue': '', |
87 'annotation': '', 'earcons': [], 'personality': null, | 87 'annotation': '', 'earcons': [], 'personality': null, |
88 'hint': '', 'category': null}]; | 88 'hint': '', 'category': null}]; |
89 } | 89 } |
90 }; | 90 }; |
91 | 91 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 // First line. | 171 // First line. |
172 sel = this.walker.next(sel); | 172 sel = this.walker.next(sel); |
173 assertEquals(this.line1Text, sel.getText()); | 173 assertEquals(this.line1Text, sel.getText()); |
174 | 174 |
175 // Wrap. | 175 // Wrap. |
176 sel.setReversed(true); | 176 sel.setReversed(true); |
177 sel = this.walker.next(sel); | 177 sel = this.walker.next(sel); |
178 assertEquals(null, sel); | 178 assertEquals(null, sel); |
179 }); | 179 }); |
OLD | NEW |