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

JCK1.4, interactive: api/javax_swing/interactive/JDialogTests.html#JDialog

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      mantis
    • CPU:
      x86, sparc
    • OS:
      generic, linux, solaris_2.6, solaris_8, windows_98, windows_2000
    • Verification:
      Verified

      Description



      Name: asR10013 Date: 04/30/2002


      Filed By : J2SE-SQA [###@###.###
      JDK : jdk1.4.1-b10, jdk1.4.0
      JCK : jck1.4-b17
      Platform[s] : RH Linux 7.2, Windows 2000 pro, sparc sol7/8/9
      switch/Mode : -client -Xmixed -Xfuture
      JCK test owner : http://javaweb.eng/jck/usr/owners.jto
      Falling test[s]: api/java_swing/interactive/JDialogTests.html#JDialog [JDialogTest0010]
       
      The specification for setLocationRelativeTo states that "If the bottom of the component is offscreen, the window is displayed to the right of the component."
      This is not correct because the code of Window.setLocationRelativeTo

      dx = invokerScreenLocation.x<(ss.width>>1) ? invokerScreenLocation.x+invokerSize.width :
                          invokerScreenLocation.x-windowBounds.width;

      places the window as to the right as well to the left of the component depending on the horizontal position of the component
      (exactly depending on whether the left border of the component is less or greater than the screen width divided by 2).
      The specification and the test description should be updated because currently the test obviously violates its assertions.

      Test source location:
      =====================
      /net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_swing/interactive/JDialogTests.java
       
      jtr file location:
      ==================
      /net/jtgb4u4c.eng/export/sail15/results/hopper/b10/jck14/linux/redhat7.2_gnome_smp_plugin_ns4.77_linux-24/workDir/api-interactive/javax_swing/interactive/JDialogTests_JDialog.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change JCK and JDK variables)

      --- script start ---
      #!/bin/sh
       
      JCK="/net/linux-15/export/home/java/jck1.4/JCK-runtime-14"
      JDK="/net/linux-15/export/home/java/jdk1.4.1/linux"
      switches="-client -Xmixed -Xfuture"
      CLASSPATH="${JCK}/classes:${JCK}/javatest.jar"
       
      $JDK/bin/java $switches -cp $CLASSPATH javasoft.sqe.tests.api.javax.swing.interactive.JDialog.JDialogTests -TestCaseID JDialogTest0010 -TestDirURL file:///${JCK}/tests/api/javax_swing/interactive!/bin/sh
       
      --- script end ---

      Test output:
      ============
      JDialogTest0010: Failed. setLocationRelativeTo(Component c) method does not behave as expected.
      STATUS:Failed.tests: 1; failed: 1; first test case failure: JDialogTest0010

      Specific Machine Info:
      ======================
      Hostname: linux-24
      OS: Linux RH 7.2

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sharonz Sharon Zakhour (Inactive)
              Reporter:
              alssunw Als Als (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: