Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8105315

animation/language/Lang003_TS200_01.fx fails on desktop but pass on mobile

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx1.0
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows XP, JFX promoted build 43, JFX Mobile build 1139.

      Description

      Compatibility test animation/language/Lang003_TS200_01.fx (listed below) fails on DesktopFX but pass on Mobile.
      By some reason t0 value exceeds some limit.
      Compatibility tests are in:
      hg clone http://jfxsrc.sfbay.sun.com/javafx/baloo/compatibility compatibility
      And SQE framework is in:
      hg clone http://jfxsrc.sfbay.sun.com/javafx/baloo/sqeframework framework

      ------------------------------
      package animation.language;

      import com.sun.fxtest.*;
      import java.io.PrintStream;

      import javafx.animation.*;
      import javafx.lang.Duration;
      import java.lang.System;
      import java.lang.Thread;



      public class Lang003_TS200_01 extends Test {

      var out_:PrintStream;
      var res : Status;

      var s1: Number;
      var t0: Number;
      var t1: Number;
      var t2: Number;
      var t3: Number;
      var t4: Number;
      var threshold: Number = 120;

      var t: Timeline = Timeline {
          repeatCount: 1
          autoReverse: false
          keyFrames: [
      KeyFrame {
                  canSkip: false
                  time : 0ms
                  action: function() {
                      t0 = getDuration(s1);
      out_.println("t0(0) = {t0} [Diff = {t0-0} ms]");
      t0 = t0-0;
                  }
              },
              KeyFrame {
                  canSkip: false
                  time : 100ms
                  action: function() {
                      t1 = getDuration(s1);
      out_.println("t1(100) = {t1} [Diff = {t1-100} ms]");
      t1 = t1-100;
                  }
              },
              KeyFrame {
                  canSkip: false
                  time : 1s
                  action: function() {
                      t2 = getDuration(s1);
      out_.println("t2(1000) = {t2} [Diff = {t2-1000} ms]");
      t2 = t2-1000;
                  }
              },
      KeyFrame {
                  canSkip: false
                  time : 0.1m
                  action: function() {
                      t3 = getDuration(s1);
      out_.println("t3(6000) = {t3} [Diff = {t3-6000} ms]");
      t3 = t3-6000;
                  }
              },
              KeyFrame {
                  canSkip: false
                  time : 0.01h // 36s
                  action: function() {
                      t4 = getDuration(s1);
      out_.println("t4(36000) = {t4} [Diff = {t4-36000} ms]");
      t4 = t4-36000;
                  }
              }
         ]
      }

      function getDuration(begin: Number): Number {
          System.currentTimeMillis() - begin;
          // TimeUnit.NANOSECONDS.toMillis((System.nanoTime()-begin).longValue());
      }

      function runLater(
      ms: Duration,
      f: function()
      ): Void {


          var timer: Timeline = Timeline {
                  repeatCount: 1
                  keyFrames: KeyFrame {
                      time: ms
                      action: function() {
                          f();
                      }
                  }
          }
          timer.play();
      }

      public override function run(param: Parameters, outarg: PrintStream,
                                       err: PrintStream, resarg: Status): Void {
        out_ = outarg;
        res = resarg;

        out_.println("Allowed range is: {threshold}");
        t.play();
        s1 = System.currentTimeMillis();
        runLater( 60s, check );
      }

      function check() {

      if((t0 < 0) or (t0 > threshold)) {
      res.addFailure("t0 out of range");
      }

      if(t1 < 0 or t1 > threshold) {
      res.addFailure("t1 out of range");
      }

      if(t2 < 0 or t2 > threshold) {
      res.addFailure("t2 out of range");

      }

      if(t3 < 0 or t3 > threshold) {
      res.addFailure("t3 out of range");
      }

      if(t4 < 0 or t4 > threshold) {
      res.addFailure("t4 out of range");
      }
      res.done();
      }

      } // end class definition

        Attachments

          Activity

            People

            • Assignee:
              kcr Kevin Rushforth
              Reporter:
              dav Andrei Dmitriev (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: