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

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

Issue 1622803002: Cleanup AutomationUtil.findNodeUntil, fix wrapping when moving by line, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 assertEquals('diff ', cursor.node.firstChild.nextSibling.name); 291 assertEquals('diff ', cursor.node.firstChild.nextSibling.name);
292 assertEquals('line', cursor.node.lastChild.name); 292 assertEquals('line', cursor.node.lastChild.name);
293 }); 293 });
294 }); 294 });
295 295
296 TEST_F('CursorsTest', 'WrappingCursors', function() { 296 TEST_F('CursorsTest', 'WrappingCursors', function() {
297 this.runWithLoadedTree(this.multiInlineDoc, function(root) { 297 this.runWithLoadedTree(this.multiInlineDoc, function(root) {
298 var para = root.firstChild; 298 var para = root.firstChild;
299 var cursor = new cursors.WrappingCursor(para, -1); 299 var cursor = new cursors.WrappingCursor(para, -1);
300 cursor = cursor.move(DOM_NODE, DIRECTIONAL, BACKWARD); 300 cursor = cursor.move(DOM_NODE, DIRECTIONAL, BACKWARD);
301 assertEquals(root.lastChild.firstChild, cursor.node); 301 assertEquals(root.lastChild.firstChild.firstChild, cursor.node);
302 cursor = cursor.move(DOM_NODE, DIRECTIONAL, FORWARD); 302 cursor = cursor.move(DOM_NODE, DIRECTIONAL, FORWARD);
303 assertEquals(root.firstChild.firstChild, cursor.node); 303 assertEquals(root.firstChild.firstChild, cursor.node);
304 }); 304 });
305 }); 305 });
306 306
307 TEST_F('CursorsTest', 'IsInWebRange', function() { 307 TEST_F('CursorsTest', 'IsInWebRange', function() {
308 this.runWithLoadedTree(this.simpleDoc, function(root) { 308 this.runWithLoadedTree(this.simpleDoc, function(root) {
309 var para = root.firstChild; 309 var para = root.firstChild;
310 var webRange = new cursors.Range.fromNode(para); 310 var webRange = new cursors.Range.fromNode(para);
311 var auraRange = cursors.Range.fromNode(root.parent); 311 var auraRange = cursors.Range.fromNode(root.parent);
312 assertFalse(auraRange.isWebRange()); 312 assertFalse(auraRange.isWebRange());
313 assertTrue(webRange.isWebRange()); 313 assertTrue(webRange.isWebRange());
314 }); 314 });
315 }); 315 });
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