Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 960 .call(assertRangeHasText('Top News')) | 960 .call(assertRangeHasText('Top News')) |
| 961 .call(doCmd('nextHeading')) | 961 .call(doCmd('nextHeading')) |
| 962 .expectSpeech('Most Popular') | 962 .expectSpeech('Most Popular') |
| 963 .call(assertRangeHasText('Most Popular')) | 963 .call(assertRangeHasText('Most Popular')) |
| 964 .call(doCmd('nextLine')) | 964 .call(doCmd('nextLine')) |
| 965 .expectSpeech('Sports') | 965 .expectSpeech('Sports') |
| 966 .call(assertRangeHasText('Sports')) | 966 .call(assertRangeHasText('Sports')) |
| 967 .replay(); | 967 .replay(); |
| 968 }); | 968 }); |
| 969 }); | 969 }); |
| 970 | |
| 971 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.
| |
| 972 var mockFeedback = this.createMockFeedback(); | |
| 973 this.runWithLoadedTree(function(root) {/*! | |
| 974 <table border=1> | |
| 975 <tr><td>name</td><td>title</td><td>address</td><td>phone</td></tr> | |
| 976 <tr><td>Dan</td><td>Mr</td><td>666 Elm Street</td><td>212 222 5555</td></tr> | |
| 977 </table> | |
| 978 */}, function(root) { | |
| 979 mockFeedback.call(doCmd('nextRow')) | |
| 980 .expectSpeech('Dan', 'row 2 column 1') | |
| 981 .call(doCmd('previousRow')) | |
| 982 .expectSpeech('name', 'row 1 column 1') | |
| 983 .call(doCmd('previousRow')) | |
| 984 .expectSpeech('No cell above.') | |
| 985 .call(doCmd('nextCol')) | |
| 986 .expectSpeech('title', 'row 1 column 2') | |
| 987 .call(doCmd('nextRow')) | |
| 988 .expectSpeech('Mr', 'row 2 column 2') | |
| 989 .call(doCmd('previousRow')) | |
| 990 .expectSpeech('title', 'row 1 column 2') | |
| 991 .call(doCmd('nextCol')) | |
| 992 .expectSpeech('address', 'row 1 column 3') | |
| 993 .call(doCmd('nextCol')) | |
| 994 .expectSpeech('phone', 'row 1 column 4') | |
| 995 .call(doCmd('nextCol')) | |
| 996 .expectSpeech('No cell right.') | |
| 997 .call(doCmd('previousRow')) | |
| 998 .expectSpeech('No cell above.') | |
| 999 .call(doCmd('nextRow')) | |
| 1000 .expectSpeech('212 222 5555', 'row 2 column 4') | |
| 1001 .call(doCmd('nextRow')) | |
| 1002 .expectSpeech('No cell below.') | |
| 1003 .call(doCmd('nextCol')) | |
| 1004 .expectSpeech('No cell right.') | |
| 1005 .call(doCmd('previousCol')) | |
| 1006 .expectSpeech('666 Elm Street', 'row 2 column 3') | |
| 1007 .call(doCmd('previousCol')) | |
| 1008 .expectSpeech('Mr', 'row 2 column 2') | |
| 1009 | |
| 1010 .call(doCmd('goToRowLastCell')) | |
| 1011 .expectSpeech('212 222 5555', 'row 2 column 4') | |
| 1012 .call(doCmd('goToRowLastCell')) | |
| 1013 .expectSpeech('212 222 5555') | |
| 1014 .call(doCmd('goToRowFirstCell')) | |
| 1015 .expectSpeech('Dan', 'row 2 column 1') | |
| 1016 .call(doCmd('goToRowFirstCell')) | |
| 1017 .expectSpeech('Dan') | |
| 1018 | |
| 1019 .call(doCmd('goToColFirstCell')) | |
| 1020 .expectSpeech('name', 'row 1 column 1') | |
| 1021 .call(doCmd('goToColFirstCell')) | |
| 1022 .expectSpeech('name') | |
| 1023 .call(doCmd('goToColLastCell')) | |
| 1024 .expectSpeech('Dan', 'row 2 column 1') | |
| 1025 .call(doCmd('goToColLastCell')) | |
| 1026 .expectSpeech('Dan') | |
| 1027 | |
| 1028 .call(doCmd('goToLastCell')) | |
| 1029 .expectSpeech('212 222 5555', 'row 2 column 4') | |
| 1030 .call(doCmd('goToLastCell')) | |
| 1031 .expectSpeech('212 222 5555') | |
| 1032 .call(doCmd('goToFirstCell')) | |
| 1033 .expectSpeech('name', 'row 1 column 1') | |
| 1034 .call(doCmd('goToFirstCell')) | |
| 1035 .expectSpeech('name') | |
| 1036 | |
| 1037 .replay(); | |
| 1038 }); | |
| 1039 }); | |
| OLD | NEW |