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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs

Issue 2099833002: For a range surrounding a node, set selection index to 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add simple test. Created 4 years, 5 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/resources/chromeos/chromevox/cvox2/background/cursors.js ('k') | no next file » | 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_next_e2e_test_base.js']); 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']);
7 7
8 /** 8 /**
9 * Test fixture for cvox2.cursors. 9 * Test fixture for cvox2.cursors.
10 * @constructor 10 * @constructor
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 }); 362 });
363 }); 363 });
364 364
365 TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() { 365 TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() {
366 this.runWithLoadedTree(this.multiInlineDoc, function(root) { 366 this.runWithLoadedTree(this.multiInlineDoc, function(root) {
367 var secondLine = root.firstChild.firstChild.firstChild.nextSibling; 367 var secondLine = root.firstChild.firstChild.firstChild.nextSibling;
368 assertEquals('inlineTextBox', secondLine.role); 368 assertEquals('inlineTextBox', secondLine.role);
369 assertEquals('diff ', secondLine.name); 369 assertEquals('diff ', secondLine.name);
370 370
371 var secondLineCursor = new cursors.Cursor(secondLine, -1); 371 var secondLineCursor = new cursors.Cursor(secondLine, -1);
372 assertEquals(-1, secondLineCursor.selectionIndex_); 372 assertEquals(0, secondLineCursor.selectionIndex_);
373 secondLineCursor = new cursors.Cursor(secondLine, 0); 373 secondLineCursor = new cursors.Cursor(secondLine, 0);
374 secondLineCursor.index = 0; 374 secondLineCursor.index = 0;
375 assertEquals(6, secondLineCursor.selectionIndex_); 375 assertEquals(6, secondLineCursor.selectionIndex_);
376 }); 376 });
377 }); 377 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698