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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs

Issue 1049853002: Support output of heading levels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
index 44d2b460fe381ae5c03eac184f2f3815d3341512..4dfb8350d7996f22b7ebc8200c5ed3242f385de5 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
@@ -23,7 +23,7 @@ OutputE2ETest.prototype = {
}
};
-TEST_F('OutputE2ETest', 'RenderBasic', function() {
+TEST_F('OutputE2ETest', 'Link', function() {
this.runWithLoadedTree('<a href="#">Click here</a>',
function(root) {
var link = root.firstChild.firstChild;
@@ -44,3 +44,23 @@ TEST_F('OutputE2ETest', 'RenderBasic', function() {
o.getBuffer());
});
});
+
+TEST_F('OutputE2ETest', 'Heading', function() {
+ this.runWithLoadedTree('<h2>Top news</h2>',
+ function(root) {
+ var heading = root.firstChild.firstChild;
+ var range = cursors.Range.fromNode(heading);
+ var o = new Output().withSpeechAndBraille(range, null, 'navigate');
+ assertEqualsJSON({string_: 'Heading 2Top news', 'spans_': [
+ {value: {}, start: 0, end: 0},
+ {value: 'hierarchicalLevel', start: 8, end: 9},
+
+ // Split markers added for empty attributes.
+ {value: {}, start: 9, end: 9},
+
+ // Value text.
+ {value: 'value', start: 9, end: 17}
+ ]},
+ o.getBuffer());
+ });
Peter Lundblad 2015/04/02 09:43:54 Check the braille output?
+});

Powered by Google App Engine
This is Rietveld 408576698