Skip to content

Commit

Permalink
8245634: [TestBug] Enable and fix tests ignored with message "impl_cs…
Browse files Browse the repository at this point in the history
…sSet API removed"

Reviewed-by: arapte
  • Loading branch information
aghaisas committed May 29, 2020
1 parent 3ceee69 commit c41777e
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 17 deletions.
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, 2020, 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 @@ -224,10 +224,17 @@ public void selectingAnEmptyCellResultsInNoChange() {
assertTrue(cell.isEditable());
}

@Ignore("impl_cssSet API removed")
@Test public void cannotSpecifyEditableViaCSS() {
// cell.impl_cssSet("-fx-editable", false);
cell.setStyle("-fx-editable: false;");
cell.applyCss();
assertTrue(cell.isEditable());

cell.setEditable(false);
assertFalse(cell.isEditable());

cell.setStyle("-fx-editable: true;");
cell.applyCss();
assertFalse(cell.isEditable());
}

/*********************************************************************
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, 2020, 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 @@ -37,7 +37,6 @@

import static test.com.sun.javafx.scene.control.infrastructure.ControlTestUtils.*;
import static org.junit.Assert.*;
import org.junit.Ignore;

/**
*/
Expand Down Expand Up @@ -185,10 +184,17 @@ public class CheckBoxTest {
assertPseudoClassDoesNotExist(btn, "indeterminate");
}

@Ignore("impl_cssSet API removed")
@Test public void cannotSpecifyIndeterminateViaCSS() {
// btn.impl_cssSet("-fx-indeterminate", true);
btn.setStyle("-fx-indeterminate: true;");
btn.applyCss();
assertFalse(btn.isIndeterminate());

btn.setIndeterminate(true);
assertTrue(btn.isIndeterminate());

btn.setStyle("-fx-indeterminate: false;");
btn.applyCss();
assertTrue(btn.isIndeterminate());
}

/*********************************************************************
Expand Down Expand Up @@ -254,10 +260,17 @@ public class CheckBoxTest {
assertPseudoClassDoesNotExist(btn, "selected");
}

@Ignore("impl_cssSet API removed")
@Test public void cannotSpecifySelectedViaCSS() {
// btn.impl_cssSet("-fx-selected", true);
btn.setStyle("-fx-selected: true;");
btn.applyCss();
assertFalse(btn.isSelected());

btn.setSelected(true);
assertTrue(btn.isSelected());

btn.setStyle("-fx-selected: false;");
btn.applyCss();
assertTrue(btn.isSelected());
}

/*********************************************************************
Expand Down Expand Up @@ -299,10 +312,17 @@ public class CheckBoxTest {
assertEquals("allowIndeterminate", btn.allowIndeterminateProperty().getName());
}

@Ignore("impl_cssSet API removed")
@Test public void cannotSpecifyAllowIndeterminateViaCSS() {
// btn.impl_cssSet("-fx-allow-indeterminate", true);
btn.setStyle("-fx-allow-indeterminate: true;");
btn.applyCss();
assertFalse(btn.isAllowIndeterminate());

btn.setAllowIndeterminate(true);
assertTrue(btn.isAllowIndeterminate());

btn.setStyle("-fx-allow-indeterminate: false;");
btn.applyCss();
assertTrue(btn.isAllowIndeterminate());
}

/*********************************************************************
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, 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 @@ -421,10 +421,17 @@ public void ensureValueIsUpdatedByCorrectSelectionModelWhenSelectionModelIsChang
assertFalse(box.isShowing());
}

@Ignore("impl_cssSet API removed")
@Test public void cannotSpecifyShowingViaCSS() {
// box.impl_cssSet("-fx-showing", true);
box.setStyle("-fx-showing: true;");
box.applyCss();
assertFalse(box.isShowing());

box.show();
assertTrue(box.isShowing());

box.setStyle("-fx-showing: false;");
box.applyCss();
assertTrue(box.isShowing());
}

@Test public void settingShowingSetsPseudoClass() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, 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 @@ -181,10 +181,17 @@ public void selectingAnEmptyCellResultsInNoChange() {
assertTrue(cell.isEditable());
}

@Ignore("impl_cssSet API removed")
@Test public void cannotSpecifyEditableViaCSS() {
// cell.impl_cssSet("-fx-editable", false);
cell.setStyle("-fx-editable: false;");
cell.applyCss();
assertTrue(cell.isEditable());

cell.setEditable(false);
assertFalse(cell.isEditable());

cell.setStyle("-fx-editable: true;");
cell.applyCss();
assertFalse(cell.isEditable());
}

/*********************************************************************
Expand Down

0 comments on commit c41777e

Please sign in to comment.