modules/controls/src/test/java/javafx/scene/control/skin/MenuButtonSkinTest.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization

@@ -21,19 +21,21 @@
  * 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;
+package javafx.scene.control.skin;
 
 import static org.junit.Assert.assertEquals;
+
+import javafx.beans.value.ObservableValue;
 import javafx.geometry.Insets;
 import javafx.scene.control.MenuButton;
 import javafx.scene.control.MenuItem;
 
+import javafx.scene.control.skin.MenuButtonSkin;
 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
  */

@@ -67,12 +69,13 @@
         int propertyChangeCount = 0;
         public MenuButtonSkinMock(MenuButton menubutton) {
             super(menubutton);
         }
         
-        @Override protected void handleControlPropertyChanged(String p) {
-            super.handleControlPropertyChanged(p);
+        public void addWatchedProperty(ObservableValue<?> p) {
+            p.addListener(o -> {
             propertyChanged = true;
             propertyChangeCount++;
+            });
         }
     }
 }