changeset 5258:50b282551554

[TEST ONLY] RT-30739: UNIT-TEST: test_rt29930 failures in Controls unit tests. Fixing and re-enabling tests related to RT-29930.
author jgiles
date Thu, 03 Oct 2013 11:17:28 +1300
parents 4f55a53bfabd
children 006b0519158b
files modules/controls/src/test/java/javafx/scene/control/ListViewKeyInputTest.java modules/controls/src/test/java/javafx/scene/control/TableViewKeyInputTest.java modules/controls/src/test/java/javafx/scene/control/TreeTableViewKeyInputTest.java modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/test/java/javafx/scene/control/ListViewKeyInputTest.java	Thu Oct 03 09:30:59 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/ListViewKeyInputTest.java	Thu Oct 03 11:17:28 2013 +1300
@@ -1073,7 +1073,7 @@
         assertEquals("Apple", listView.getFocusModel().getFocusedItem());
     }
     
-    @Ignore @Test public void test_rt29930() {
+    @Test public void test_rt29930() {
         sm.setSelectionMode(SelectionMode.MULTIPLE);
         
         sm.clearAndSelect(0);
@@ -1084,7 +1084,7 @@
         assertEquals(2, fm.getFocusedIndex());
         assertEquals(0, getAnchor());
         
-        keyboard.doKeyPress(KeyCode.SPACE, KeyModifier.getShortcutKey()); // set new anchor point
+        keyboard.doKeyPress(KeyCode.SPACE, KeyModifier.getShortcutKey(), PlatformUtil.isMac() ? KeyModifier.CTRL : null); // set new anchor point
         assertTrue(isSelected(0,1));
         assertEquals(2, fm.getFocusedIndex());
         assertEquals(2, getAnchor());
--- a/modules/controls/src/test/java/javafx/scene/control/TableViewKeyInputTest.java	Thu Oct 03 09:30:59 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TableViewKeyInputTest.java	Thu Oct 03 11:17:28 2013 +1300
@@ -1801,7 +1801,7 @@
         assertTrue(isSelected(5,6,7,8,9));
     }
     
-    @Ignore @Test public void test_rt29930() {
+    @Test public void test_rt29930() {
         sm.setCellSelectionEnabled(false);
         sm.setSelectionMode(SelectionMode.MULTIPLE);
         
@@ -1815,7 +1815,7 @@
         assertEquals(2, fm.getFocusedIndex());
         assertEquals(0, getAnchor().getRow());
         
-        keyboard.doKeyPress(KeyCode.SPACE, KeyModifier.getShortcutKey()); // set new anchor point
+        keyboard.doKeyPress(KeyCode.SPACE, KeyModifier.getShortcutKey(), PlatformUtil.isMac() ? KeyModifier.CTRL : null); // set new anchor point
         assertTrue(isSelected(0,1));
         assertEquals(2, sm.getSelectedIndices().size());
         assertEquals(2, sm.getSelectedCells().size());
--- a/modules/controls/src/test/java/javafx/scene/control/TreeTableViewKeyInputTest.java	Thu Oct 03 09:30:59 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeTableViewKeyInputTest.java	Thu Oct 03 11:17:28 2013 +1300
@@ -2323,7 +2323,7 @@
         assertTrue(debug(), fm.isFocused(13));
     }
     
-    @Ignore @Test public void test_rt29930() {
+    @Test public void test_rt29930() {
         sm.setCellSelectionEnabled(false);
         sm.setSelectionMode(SelectionMode.MULTIPLE);
         
@@ -2335,7 +2335,7 @@
         assertEquals(2, fm.getFocusedIndex());
         assertEquals(0, getAnchor().getRow());
         
-        keyboard.doKeyPress(KeyCode.SPACE, KeyModifier.getShortcutKey()); // set new anchor point
+        keyboard.doKeyPress(KeyCode.SPACE, KeyModifier.getShortcutKey(), PlatformUtil.isMac() ? KeyModifier.CTRL : null); // set new anchor point
         assertTrue(isSelected(0,1));
         assertEquals(2, fm.getFocusedIndex());
         assertEquals(2, getAnchor().getRow());
--- a/modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java	Thu Oct 03 09:30:59 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java	Thu Oct 03 11:17:28 2013 +1300
@@ -1274,7 +1274,7 @@
         assertEquals(root, treeView.getFocusModel().getFocusedItem());
     }
     
-    @Ignore @Test public void test_rt29930() {
+    @Test public void test_rt29930() {
         sm.setSelectionMode(SelectionMode.MULTIPLE);
         
         sm.clearAndSelect(0);
@@ -1284,7 +1284,7 @@
         assertTrue(isSelected(0,1,2));
         assertEquals(2, fm.getFocusedIndex());
         assertEquals(0, getAnchor());
-        
+
         keyboard.doKeyPress(KeyCode.SPACE, KeyModifier.getShortcutKey(),
                 (Utils.isMac()  ? KeyModifier.CTRL : null)); // set new anchor point
         assertTrue(isSelected(0,1));