On Fri, 28 Feb 2020 12:00:23 GMT, Ajit Ghaisas <aghai...@openjdk.org> wrote:
>> Also, I'm a bit weary about the "else if" (vs a simple "else") - wouldn't it >> be some kind of setup error if the node orientation is neither rtl nor ltr? >> If so, I would add a test to check for it once. > > Initially I had thought about adding separate test file for RTL - something > like RTLTableViewKeyInputTest - but, realized that although it's a cleaner > approach, we would simply duplicate the tests. Also, the fact is only > LEFT/RIGHT key navigation is sensitive to NodeOrientation - hence only a > subset of tests needed modification. This is the reason I have parameterized > the test. > > To your specific question, since it is a parameterized test, only possible > values are LTR and RTL which are specified as @Parameterized.Parameters. I > don't think, we need additional check for some other value. Regarding your suggestion of having forward/backward semantic methods and calling them in tests - There are two types of tests - 1. Key action remains same - asserts differ based on NodeOrientation 2. Key action differs based on NodeOrientation - but, asserts remain same Example of 1 is - test_rt18488_selectToLeft Example of 2 is - test_rt18591_cell_1 Your suggestion can be applied only to the tests of type-2. I will try to update tests of this type. ------------- PR: https://git.openjdk.java.net/jfx/pull/114