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

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

Issue 2740793002: Minimize the Classic API and enable it for Next (Closed)
Patch Set: Minimize the Classic API and enable it for Next Created 3 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 unified diff | Download patch
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 '../../testing/assert_additions.js']); 7 '../../testing/assert_additions.js']);
8 8
9 GEN_INCLUDE(['../../testing/mock_feedback.js']); 9 GEN_INCLUDE(['../../testing/mock_feedback.js']);
10 10
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Now, verify mode switching uses the top level root. 557 // Now, verify mode switching uses the top level root.
558 fakeWebRoot.docUrl = 'http://google.com/#chromevox_next_test'; 558 fakeWebRoot.docUrl = 'http://google.com/#chromevox_next_test';
559 fakeSubRoot.docUrl = 'http://chromevox.com'; 559 fakeSubRoot.docUrl = 'http://chromevox.com';
560 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); 560 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot));
561 assertEquals('next', bk.mode); 561 assertEquals('next', bk.mode);
562 562
563 // Next compat switching. 563 // Next compat switching.
564 localStorage['useClassic'] = false; 564 localStorage['useClassic'] = false;
565 fakeWebRoot.docUrl = 'http://docs.google.com/document/#123123'; 565 fakeWebRoot.docUrl = 'http://docs.google.com/document/#123123';
566 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); 566 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot));
567 assertEquals('next_compat', bk.mode); 567 assertEquals('force_next', bk.mode);
568 568
569 // And, back to force next. 569 // And, back to force next.
570 fakeWebRoot.docUrl = 'http://docs.google.com/form/123'; 570 fakeWebRoot.docUrl = 'http://docs.google.com/form/123';
571 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); 571 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot));
572 assertEquals('force_next', bk.mode); 572 assertEquals('force_next', bk.mode);
573 }.bind(this)); 573 }.bind(this));
574 }); 574 });
575 575
576 TEST_F('BackgroundTest', 'ShouldNotFocusIframe', function() { 576 TEST_F('BackgroundTest', 'ShouldNotFocusIframe', function() {
577 this.runWithLoadedTree( function() {/*! 577 this.runWithLoadedTree( function() {/*!
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 .call(doCmd('nextWord')) 1221 .call(doCmd('nextWord'))
1222 .expectBraille(text, {startIndex: 5, endIndex: 7}) // is 1222 .expectBraille(text, {startIndex: 5, endIndex: 7}) // is
1223 .call(doCmd('previousWord')) 1223 .call(doCmd('previousWord'))
1224 .expectBraille(text, {startIndex: 0, endIndex: 4}) // This 1224 .expectBraille(text, {startIndex: 0, endIndex: 4}) // This
1225 .call(doCmd('nextLine')) 1225 .call(doCmd('nextLine'))
1226 // Ensure nothing is selected when the range covers the entire line. 1226 // Ensure nothing is selected when the range covers the entire line.
1227 .expectBraille('with a second line', {startIndex: -1, endIndex: -1}) 1227 .expectBraille('with a second line', {startIndex: -1, endIndex: -1})
1228 .replay(); 1228 .replay();
1229 }); 1229 });
1230 }); 1230 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698