modules/controls/src/test/java/javafx/scene/control/skin/ToolBarSkinTest.java
Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization
*** 21,40 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package com.sun.javafx.scene.control.skin;
import static org.junit.Assert.assertEquals;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.scene.control.Button;
import javafx.scene.control.ToolBar;
import org.junit.Before;
- import org.junit.Ignore;
import org.junit.Test;
/**
* This fails with IllegalStateException because of the toolkit's check for the FX application thread
*/
--- 21,42 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package javafx.scene.control.skin;
import static org.junit.Assert.assertEquals;
+
+ import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.scene.control.Button;
import javafx.scene.control.ToolBar;
+ import javafx.scene.control.skin.ToolBarSkin;
import org.junit.Before;
import org.junit.Test;
/**
* This fails with IllegalStateException because of the toolkit's check for the FX application thread
*/
*** 70,81 ****
int propertyChangeCount = 0;
public ToolBarSkinMock(ToolBar toolbar) {
super(toolbar);
}
! @Override protected void handleControlPropertyChanged(String p) {
! super.handleControlPropertyChanged(p);
propertyChanged = true;
propertyChangeCount++;
}
}
}
--- 72,84 ----
int propertyChangeCount = 0;
public ToolBarSkinMock(ToolBar toolbar) {
super(toolbar);
}
! public void addWatchedProperty(ObservableValue<?> p) {
! p.addListener(o -> {
propertyChanged = true;
propertyChangeCount++;
+ });
}
}
}