< prev index next >

test/javax/swing/JMenu/4515762/bug4515762.java

Print this page
rev 14031 : 8160974: [TESTBUG] Mark more headful tests with @key headful.

This is a backport of fe58d505fffd from jdk9. 228/596 hunks apply without
modifications. 16 hunks required manual rework. The remainder were for files
not present in jdk8u.


  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.*;
  25 import java.awt.event.*;
  26 import javax.swing.*;
  27 import sun.awt.SunToolkit;
  28 
  29 /**
  30  * @test

  31  * @bug 4515762
  32  * @author Mark Davidson
  33  * @summary Tests the ability to support duplicate mnemonics
  34  * @library ../../regtesthelpers
  35  * @build Util
  36  * @run main bug4515762
  37  */
  38 public class bug4515762 {
  39 
  40     private static volatile boolean actionExpected = false;
  41     private static volatile boolean actionRecieved = false;
  42 
  43     /**
  44      * @param str name of Menu
  45      */
  46     private static JMenuBar createMenuBar() {
  47         JMenuBar menubar = new JMenuBar();
  48 
  49         // Duplicate menu item test for 4515762
  50         JMenu menu = new JMenu("Duplicate Menu");




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.awt.*;
  25 import java.awt.event.*;
  26 import javax.swing.*;
  27 import sun.awt.SunToolkit;
  28 
  29 /**
  30  * @test
  31  * @key headful
  32  * @bug 4515762
  33  * @author Mark Davidson
  34  * @summary Tests the ability to support duplicate mnemonics
  35  * @library ../../regtesthelpers
  36  * @build Util
  37  * @run main bug4515762
  38  */
  39 public class bug4515762 {
  40 
  41     private static volatile boolean actionExpected = false;
  42     private static volatile boolean actionRecieved = false;
  43 
  44     /**
  45      * @param str name of Menu
  46      */
  47     private static JMenuBar createMenuBar() {
  48         JMenuBar menubar = new JMenuBar();
  49 
  50         // Duplicate menu item test for 4515762
  51         JMenu menu = new JMenu("Duplicate Menu");


< prev index next >