modules/graphics/src/test/java/test/com/sun/scenario/animation/AbstractMasterTimerTest.java

Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:

@@ -21,14 +21,16 @@
  * 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.scenario.animation;
+package test.com.sun.scenario.animation;
 
 import javafx.animation.AnimationTimer;
 import com.sun.scenario.DelayedRunnable;
+import com.sun.scenario.animation.AbstractMasterTimer;
+import com.sun.scenario.animation.AbstractMasterTimerShim;
 import com.sun.scenario.animation.shared.PulseReceiver;
 import com.sun.scenario.animation.shared.TimerReceiver;
 import org.junit.Before;
 import org.junit.Test;
 

@@ -165,11 +167,13 @@
                 animationRunnable.run();
             }
         }
 
         @Override public long nanos() {
-            return isPaused() ? getStartPauseTime() : nanos - getTotalPausedTime();
+            return AbstractMasterTimerShim.isPaused(this) ? 
+                    AbstractMasterTimerShim.getStartPauseTime(this) : 
+                    nanos - AbstractMasterTimerShim.getTotalPausedTime(this);
         }
 
         @Override
         protected void postUpdateAnimationRunnable(
                 DelayedRunnable animationRunnable) {