Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs |
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs |
| index 847f58a2b3e0656ddd6153665193ac649cae7e02..556a6ea4b0210dd8abe7c84c253f7fef8bb5fda0 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs |
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs |
| @@ -967,3 +967,73 @@ TEST_F('BackgroundTest', 'ContentEditableJumpSyncsRange', function() { |
| .replay(); |
| }); |
| }); |
| + |
| +TEST_F('BackgroundTest', 'BasicTableCommands', function() { |
|
dmazzoni
2016/07/13 23:38:28
Could you add a test where a cell is missing? For
David Tseng
2016/07/14 20:24:41
Done.
|
| + var mockFeedback = this.createMockFeedback(); |
| + this.runWithLoadedTree(function(root) {/*! |
| + <table border=1> |
| + <tr><td>name</td><td>title</td><td>address</td><td>phone</td></tr> |
| + <tr><td>Dan</td><td>Mr</td><td>666 Elm Street</td><td>212 222 5555</td></tr> |
| + </table> |
| + */}, function(root) { |
| + mockFeedback.call(doCmd('nextRow')) |
| + .expectSpeech('Dan', 'row 2 column 1') |
| + .call(doCmd('previousRow')) |
| + .expectSpeech('name', 'row 1 column 1') |
| + .call(doCmd('previousRow')) |
| + .expectSpeech('No cell above.') |
| + .call(doCmd('nextCol')) |
| + .expectSpeech('title', 'row 1 column 2') |
| + .call(doCmd('nextRow')) |
| + .expectSpeech('Mr', 'row 2 column 2') |
| + .call(doCmd('previousRow')) |
| + .expectSpeech('title', 'row 1 column 2') |
| + .call(doCmd('nextCol')) |
| + .expectSpeech('address', 'row 1 column 3') |
| + .call(doCmd('nextCol')) |
| + .expectSpeech('phone', 'row 1 column 4') |
| + .call(doCmd('nextCol')) |
| + .expectSpeech('No cell right.') |
| + .call(doCmd('previousRow')) |
| + .expectSpeech('No cell above.') |
| + .call(doCmd('nextRow')) |
| + .expectSpeech('212 222 5555', 'row 2 column 4') |
| + .call(doCmd('nextRow')) |
| + .expectSpeech('No cell below.') |
| + .call(doCmd('nextCol')) |
| + .expectSpeech('No cell right.') |
| + .call(doCmd('previousCol')) |
| + .expectSpeech('666 Elm Street', 'row 2 column 3') |
| + .call(doCmd('previousCol')) |
| + .expectSpeech('Mr', 'row 2 column 2') |
| + |
| + .call(doCmd('goToRowLastCell')) |
| + .expectSpeech('212 222 5555', 'row 2 column 4') |
| + .call(doCmd('goToRowLastCell')) |
| + .expectSpeech('212 222 5555') |
| + .call(doCmd('goToRowFirstCell')) |
| + .expectSpeech('Dan', 'row 2 column 1') |
| + .call(doCmd('goToRowFirstCell')) |
| + .expectSpeech('Dan') |
| + |
| + .call(doCmd('goToColFirstCell')) |
| + .expectSpeech('name', 'row 1 column 1') |
| + .call(doCmd('goToColFirstCell')) |
| + .expectSpeech('name') |
| + .call(doCmd('goToColLastCell')) |
| + .expectSpeech('Dan', 'row 2 column 1') |
| + .call(doCmd('goToColLastCell')) |
| + .expectSpeech('Dan') |
| + |
| + .call(doCmd('goToLastCell')) |
| + .expectSpeech('212 222 5555', 'row 2 column 4') |
| + .call(doCmd('goToLastCell')) |
| + .expectSpeech('212 222 5555') |
| + .call(doCmd('goToFirstCell')) |
| + .expectSpeech('name', 'row 1 column 1') |
| + .call(doCmd('goToFirstCell')) |
| + .expectSpeech('name') |
| + |
| + .replay(); |
| + }); |
| +}); |