Skip to content

Commit

Permalink
8234150: Address ignored tests in ComboBoxTest, LabeledTest, HyperLin…
Browse files Browse the repository at this point in the history
…kTest and TextInputControlTest

Reviewed-by: kcr
  • Loading branch information
aghaisas committed Nov 17, 2019
1 parent 4f496d4 commit e37cb37
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -859,7 +859,7 @@ public void defaultConverterCanHandleIncorrectType_2() {
assertTrue(sm.isSelected(2));
}

@Ignore("Test not working as the heights being returned are not accurate")
@Ignore("JDK-8091127 Test not working as the heights being returned are not accurate")
@Test public void test_rt20106() {
comboBox.getItems().addAll("0","1","2","3","4","5","6","7","8","9");

Expand Down Expand Up @@ -948,7 +948,6 @@ public void defaultConverterCanHandleIncorrectType_2() {
assertEquals("TO_STRING", cell.getText());
}

@Ignore
@Test public void test_rt20189() {
comboBox.getItems().addAll("0","1","2","3","4","5","6","7","8","9");

Expand All @@ -958,8 +957,6 @@ public void defaultConverterCanHandleIncorrectType_2() {
comboBox.applyCss();
comboBox.show();

SelectionModel sm = getListView().getSelectionModel();

comboBox.getSelectionModel().select(2);
Object item = sm.getSelectedItem();
assertEquals("2", item);
Expand Down Expand Up @@ -1200,7 +1197,6 @@ public void defaultConverterCanHandleIncorrectType_2() {
}

private int test_rt34603_count = 0;
@Ignore("Bug has not yet been resolved")
@Test public void test_rt34603() {
assertEquals(0, test_rt34603_count);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -47,7 +47,6 @@
import javafx.scene.shape.Rectangle;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class HyperlinkTest {
Expand Down Expand Up @@ -176,29 +175,6 @@ public class HyperlinkTest {
}
}

@Ignore ("replaced by visitedPropertyIsNotStyleable")
@Test public void whenVisitedIsBound_impl_cssSettable_ReturnsFalse() {
// will return null!
CssMetaData styleable = ((StyleableProperty)link.visitedProperty()).getCssMetaData();
assertFalse(styleable.isSettable(link));
BooleanProperty other = new SimpleBooleanProperty(true);
link.visitedProperty().bind(other);
}

@Ignore ("replaced by visitedPropertyIsNotStyleable")
@Test public void whenVisitedIsSpecifiedViaCSSAndIsNotBound_impl_cssSettable_ReturnsFalse() {
// will return null!
CssMetaData styleable = ((StyleableProperty)link.visitedProperty()).getCssMetaData();
assertFalse(styleable.isSettable(link));
}

@Ignore ("replaced by visitedPropertyIsNotStyleable")
@Test public void cannotSpecifyVisitedViaCSS() {
// will return null!
((StyleableProperty)link.visitedProperty()).applyStyle(null, Boolean.TRUE);
assertFalse(link.isVisited());
}

@Test public void settingVisitedSetsPseudoClass() {
link.setVisited(true);
assertPseudoClassExists(link, "visited");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -243,7 +243,6 @@ public class LabeledTest {
* *
*******************************************************************************/

@Ignore("This is not the default whilst we await a fix for RT-12212")
@Test public void alignmentDefaultValueIsCENTER_LEFT() {
assertEquals(Pos.CENTER_LEFT, labeled.getAlignment());
}
Expand Down Expand Up @@ -765,11 +764,10 @@ public class LabeledTest {
assertEquals(Insets.EMPTY, labeled.labelPaddingProperty().get());
}

@Ignore ("labelPaddingProperty returns read-only property")
@Test public void canSpecifyLabelPaddingFromCSS() {
Insets insets = new Insets(5, 4, 3, 2);
// CssMetaData styleable = ((StyleableProperty)labeled.labelPaddingProperty()).getCssMetaData();
// styleable.set(labeled,insets, null);
CssMetaData styleable = ((StyleableProperty)labeled.labelPaddingProperty()).getCssMetaData();
styleable.set(labeled, insets, null);
assertEquals(insets, labeled.getLabelPadding());
assertEquals(insets, labeled.labelPaddingProperty().get());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import javafx.scene.control.TextInputControl;
import com.sun.javafx.tk.Toolkit;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand Down Expand Up @@ -206,15 +205,6 @@ public TextInputControlTest(Class type) {
assertEquals("Oranges", textInput.getText());
}

@Ignore("getCssMetaData will return null for textProperty")
@Test public void impl_cssSettable_ReturnsFalseForTextAlways() {
CssMetaData styleable = ((StyleableProperty)textInput.textProperty()).getCssMetaData();
assertTrue(styleable.isSettable(textInput));
StringProperty other = new SimpleStringProperty("Apples");
textInput.textProperty().bind(other);
assertFalse(styleable.isSettable(textInput));
}

@Test public void cannotSpecifyTextViaCSS() {
try {
CssMetaData styleable = ((StyleableProperty)textInput.textProperty()).getCssMetaData();
Expand Down Expand Up @@ -317,15 +307,6 @@ public TextInputControlTest(Class type) {
assertTrue(textInput.isEditable());
}

@Ignore("getCssMetaData will return null for editableProperty")
@Test public void impl_cssSettable_ReturnsFalseForEditableAlways() {
CssMetaData styleable = ((StyleableProperty)textInput.editableProperty()).getCssMetaData();
assertTrue(styleable.isSettable(textInput));
StringProperty other = new SimpleStringProperty("Apples");
textInput.textProperty().bind(other);
assertFalse(styleable.isSettable(textInput));
}

@Test public void cannotSpecifyEditableViaCSS() {
try {
CssMetaData styleable = ((StyleableProperty)textInput.editableProperty()).getCssMetaData();
Expand Down Expand Up @@ -451,9 +432,6 @@ public void caretAndAnchorPositionAfterSettingText() {
assertTrue(passed[0]);
}

@Ignore("The notification here doesn't happen because the invalid flag is set after the first set," +
"however setting a change listener *must* clear that, but doesn't. I copied the code for this " +
"straight from the beans package, so there may be a bug there.")
@Test public void lengthChangeNotificationWhenTextIsSetToEmptyResult() {
textInput.setText("Goodbye");
final boolean[] passed = new boolean[] { false };
Expand Down Expand Up @@ -642,11 +620,6 @@ public void caretAndAnchorPositionAfterSettingText() {
assertTrue(passed[0]);
}

@Ignore
@Test public void selectionCanBeNull() {

}

/******************************************************
* Test for cut/copy/paste *
*****************************************************/
Expand Down

0 comments on commit e37cb37

Please sign in to comment.