diff options
author | Vitaly Provodin <vitaly.provodin@jetbrains.com> | 2017-03-02 15:11:31 +0700 |
---|---|---|
committer | Alexey Ushakov <Alexey.Ushakov@jetbrains.com> | 2017-03-31 16:51:57 +0300 |
commit | 330c759bedb0af38fabfefadd6f143187eeff4f6 (patch) | |
tree | 73b75a4aa181c27a2889f2a57c95020f7c01c62d | |
parent | c8766d3a1f482f67cd832848e32ecdf49cde415e (diff) | |
download | jdk8u_jdk-330c759bedb0af38fabfefadd6f143187eeff4f6.tar.gz |
backported fixes for test bugs from jdk9
-rw-r--r-- | test/java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java | 79 | ||||
-rw-r--r-- | test/java/awt/FontClass/DebugFonts.java | 4 | ||||
-rw-r--r-- | test/java/awt/Mixing/HWDisappear.java | 49 | ||||
-rw-r--r-- | test/java/awt/Paint/bug8024864.java | 6 | ||||
-rw-r--r-- | test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java | 27 | ||||
-rw-r--r-- | test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh | 14 | ||||
-rw-r--r-- | test/javax/swing/ToolTipManager/7123767/bug7123767.java | 186 | ||||
-rw-r--r-- | test/jbProblemsList.txt | 57 | ||||
-rw-r--r-- | test/sample/chatserver/ChatTest.java | 6 | ||||
-rw-r--r-- | test/sample/mergesort/MergeSortTest.java | 6 |
10 files changed, 226 insertions, 208 deletions
diff --git a/test/java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java b/test/java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java index 5512e4febb..6131070e71 100644 --- a/test/java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java +++ b/test/java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java @@ -23,12 +23,13 @@ /* @test - @bug 6562853 - @summary Tests that focus transfered directy to window w/o transfering it to frame. - @author Oleg Sukhodolsky: area=awt.focus - @library ../../regtesthelpers - @build Util - @run main TranserFocusToWindow + @key headful + @bug 6562853 7035459 + @summary Tests that focus transfered directy to window w/o transfering it to frame. + @author Oleg Sukhodolsky: area=awt.focus + @library ../../regtesthelpers + @build Util + @run main TranserFocusToWindow */ import java.awt.Button; @@ -44,10 +45,13 @@ import test.java.awt.regtesthelpers.Util; public class TranserFocusToWindow { + private static final int WIDTH = 300; + private static final int HEIGHT = 200; + public static void main(String[] args) { Robot robot = Util.createRobot(); Frame owner_frame = new Frame("Owner frame"); - owner_frame.setBounds(0, 0, 200, 200); + owner_frame.setBounds(0, 0, WIDTH, HEIGHT); owner_frame.setVisible(true); Util.waitForIdle(robot); @@ -55,7 +59,7 @@ public class TranserFocusToWindow Button btn1 = new Button("button for focus"); window.add(btn1); window.pack(); - window.setLocation(0, 300); + window.setLocation(0, HEIGHT + 100); window.setVisible(true); Util.waitForIdle(robot); @@ -63,43 +67,40 @@ public class TranserFocusToWindow Button btn2 = new Button("button in a frame"); another_frame.add(btn2); another_frame.pack(); - another_frame.setLocation(300, 0); + another_frame.setLocation(WIDTH + 100, 0); another_frame.setVisible(true); Util.waitForIdle(robot); - Util.clickOnTitle(owner_frame, robot); - Util.waitForIdle(robot); - - setFocus(btn1, robot); - - setFocus(btn2, robot); - owner_frame.addWindowFocusListener(new WindowFocusListener() { - public void windowLostFocus(WindowEvent we) { - System.out.println(we); - } - public void windowGainedFocus(WindowEvent we) { - System.out.println(we); - throw new RuntimeException("owner frame must not receive WINDWO_GAINED_FOCUS"); - } - }); + public void windowLostFocus(WindowEvent we) { + System.out.println(we); + } + public void windowGainedFocus(WindowEvent we) { + System.out.println(we); + throw new RuntimeException("owner frame must not receive WINDWO_GAINED_FOCUS"); + } + }); window.addWindowFocusListener(new WindowFocusListener() { - public void windowLostFocus(WindowEvent we) { - System.out.println(we); - } - public void windowGainedFocus(WindowEvent we) { - System.out.println(we); - } - }); + public void windowLostFocus(WindowEvent we) { + System.out.println(we); + } + public void windowGainedFocus(WindowEvent we) { + System.out.println(we); + } + }); another_frame.addWindowFocusListener(new WindowFocusListener() { - public void windowLostFocus(WindowEvent we) { - System.out.println(we); - } - public void windowGainedFocus(WindowEvent we) { - System.out.println(we); - } - }); + public void windowLostFocus(WindowEvent we) { + System.out.println(we); + } + public void windowGainedFocus(WindowEvent we) { + System.out.println(we); + } + }); + Util.clickOnTitle(owner_frame, robot); + Util.waitForIdle(robot); + setFocus(btn1, robot); + setFocus(btn2, robot); // we need this delay so WM can not treat two clicks on title as double click robot.delay(500); Util.clickOnTitle(owner_frame, robot); @@ -120,4 +121,4 @@ public class TranserFocusToWindow throw new RuntimeException("can not set focus on " + comp); } } -} +}
\ No newline at end of file diff --git a/test/java/awt/FontClass/DebugFonts.java b/test/java/awt/FontClass/DebugFonts.java index ce0eb4bb35..8a040f950c 100644 --- a/test/java/awt/FontClass/DebugFonts.java +++ b/test/java/awt/FontClass/DebugFonts.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4956241 80769790 + * @bug 4956241 8076979 8080953 * @summary NPE debugging fonts * @run main/othervm DebugFonts */ @@ -39,4 +39,4 @@ public class DebugFonts { String s1 = font.getFamily(); String s2 = font.getFontName(); } -} +}
\ No newline at end of file diff --git a/test/java/awt/Mixing/HWDisappear.java b/test/java/awt/Mixing/HWDisappear.java index f43e4c26e1..c4818b2d97 100644 --- a/test/java/awt/Mixing/HWDisappear.java +++ b/test/java/awt/Mixing/HWDisappear.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ /* @test %W% %E% + @key headful @bug 6769511 @summary AWT components are invisible for a while after frame is moved & menu items are visible @author anthony.petrov@...: area=awt.mixing @@ -40,6 +41,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; +import javax.swing.plaf.metal.MetalLookAndFeel; import test.java.awt.regtesthelpers.Util; public class HWDisappear @@ -52,11 +54,11 @@ public class HWDisappear //*** Create instructions for the user here *** String[] instructions = - { - "This is an AUTOMATIC test, simply wait until it is done.", - "The result (passed or failed) will be shown in the", - "message window below." - }; + { + "This is an AUTOMATIC test, simply wait until it is done.", + "The result (passed or failed) will be shown in the", + "message window below." + }; Sysout.createDialog( ); Sysout.printInstructions( instructions ); @@ -109,7 +111,7 @@ public class HWDisappear // Click on the button. Point bLoc = b.getLocationOnScreen(); - robot.mouseMove(bLoc.x + b.getWidth() / 2, bLoc.y + 5); + robot.mouseMove(bLoc.x + b.getWidth() / 2, bLoc.y + b.getHeight() / 2); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); @@ -148,8 +150,9 @@ public class HWDisappear // instantiated in the same VM. Being static (and using // static vars), it aint gonna work. Not worrying about // it for now. - public static void main( String args[] ) throws InterruptedException + public static void main( String args[] ) throws Exception { + UIManager.setLookAndFeel(new MetalLookAndFeel()); mainThread = Thread.currentThread(); try { @@ -290,21 +293,21 @@ class NewClass implements anInterface /**************************************************** Standard Test Machinery DO NOT modify anything below -- it's a standard - chunk of code whose purpose is to make user - interaction uniform, and thereby make it simpler - to read and understand someone else's test. + chunk of code whose purpose is to make user + interaction uniform, and thereby make it simpler + to read and understand someone else's test. ****************************************************/ /** This is part of the standard test machinery. It creates a dialog (with the instructions), and is the interface - for sending text messages to the user. + for sending text messages to the user. To print the instructions, send an array of strings to Sysout.createDialog - WithInstructions method. Put one line of instructions per array entry. + WithInstructions method. Put one line of instructions per array entry. To display a message for the tester to see, simply call Sysout.println - with the string to be displayed. + with the string to be displayed. This mimics System.out.println but works within the test harness as well - as standalone. + as standalone. */ class Sysout @@ -344,13 +347,13 @@ class Sysout }// Sysout class /** - This is part of the standard test machinery. It provides a place for the - test instructions to be displayed, and a place for interactive messages - to the user to be displayed. - To have the test instructions displayed, see Sysout. - To have a message to the user be displayed, see Sysout. - Do not call anything in this dialog directly. - */ + This is part of the standard test machinery. It provides a place for the + test instructions to be displayed, and a place for interactive messages + to the user to be displayed. + To have the test instructions displayed, see Sysout. + To have a message to the user be displayed, see Sysout. + Do not call anything in this dialog directly. + */ class TestDialog extends Dialog { @@ -394,7 +397,7 @@ class TestDialog extends Dialog { //Try to chop on a word boundary int posOfSpace = remainingStr. - lastIndexOf( ' ', maxStringLength - 1 ); + lastIndexOf( ' ', maxStringLength - 1 ); if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1; diff --git a/test/java/awt/Paint/bug8024864.java b/test/java/awt/Paint/bug8024864.java index 42580a4c94..e24a071984 100644 --- a/test/java/awt/Paint/bug8024864.java +++ b/test/java/awt/Paint/bug8024864.java @@ -21,7 +21,9 @@ * questions. */ -/* @test +/* + * @test + * @key headful * @bug 8024864 8031422 * @summary [macosx] Problems with rendering of controls * @author Petr Pchelko @@ -81,4 +83,4 @@ public class bug8024864 } } } -} +}
\ No newline at end of file diff --git a/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java b/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java index b5e019ec77..bceb939b68 100644 --- a/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java +++ b/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java @@ -1,5 +1,5 @@ /* -* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,9 +21,8 @@ * questions. */ -import sun.awt.OSInfo; - -import java.awt.*; +import java.awt.Point; +import java.awt.Window; import java.awt.Robot; import java.awt.event.InputEvent; import java.lang.InterruptedException; @@ -31,13 +30,19 @@ import java.lang.System; import java.lang.Thread; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import javax.swing.*; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; +import javax.swing.WindowConstants; /* * @test * @bug 8024185 * @summary Native Mac OS X full screen does not work after showing the splash + * @requires (os.family == "mac") * @library ../ + * @library ../../../../lib/testlibrary + * @modules java.desktop/sun.awt + * java.desktop/com.apple.eawt * @build GenerateTestImage * @run main GenerateTestImage * @author Petr Pchelko area=awt.event @@ -52,13 +57,10 @@ public class FullScreenAfterSplash { public static void main(String[] args) throws Exception { - if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) { - System.out.println("The test is applicable only to Mac OS X. Passed"); - return; - } try { //Move the mouse out, because it could interfere with the test. Robot r = new Robot(); + r.setAutoDelay(50); r.mouseMove(0, 0); sleep(); @@ -66,7 +68,10 @@ public class FullScreenAfterSplash { sleep(); Point fullScreenButtonPos = frame.getLocation(); - fullScreenButtonPos.translate(frame.getWidth() - 10, 10); + if(System.getProperty("os.version").equals("10.9")) + fullScreenButtonPos.translate(frame.getWidth() - 10, frame.getHeight()/2); + else + fullScreenButtonPos.translate(55,frame.getHeight()/2); r.mouseMove(fullScreenButtonPos.x, fullScreenButtonPos.y); //Cant use waitForIdle for full screen transition. @@ -137,4 +142,4 @@ public class FullScreenAfterSplash { Thread.sleep(500); } catch (InterruptedException ignored) { } } -} +}
\ No newline at end of file diff --git a/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh b/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh index 290029e95a..d77a34d713 100644 --- a/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh +++ b/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,9 +24,11 @@ #!/bin/ksh -p # # @test IOExceptionIfEncodedURLTest.sh -# @bug 6193279 6619458 +# @bug 6193279 6619458 8137087 # @summary REGRESSION: AppletViewer throws IOException when path is encoded URL # @author Dmitry Cherepanov: area=appletviewer +# @modules java.base/sun.net.www +# java.desktop # @run compile IOExceptionIfEncodedURLTest.java # @run main IOExceptionIfEncodedURLTest # @run shell IOExceptionIfEncodedURLTest.sh @@ -54,7 +56,7 @@ pass() #Call this to run the test with a file name test() { - ${TESTJAVA}${FILESEP}bin${FILESEP}appletviewer -Xnosecurity ${URL} > err 2>&1 & + "${TESTJAVA}"${FILESEP}bin${FILESEP}appletviewer -Xnosecurity ${URL} > err 2>&1 & APPLET_ID=$! sleep 15 kill -9 $APPLET_ID @@ -132,7 +134,9 @@ case "$OS" in DEFAULT_JDK="/cygdrive/c/Program\ Files/Java/jdk1.8.0" FILESEP="/" PATHSEP=";" - TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}` + TMP=`cd "${SYSTEMROOT}/Temp"; echo ${PWD}` + x="cygpath -m $PWD" + PWD=$(eval $x) ;; AIX ) @@ -256,4 +260,4 @@ URL="file:"${UNENCODED} test # pick up our toys from the scratch directory -rm ${UNENCODED} +rm ${UNENCODED}
\ No newline at end of file diff --git a/test/javax/swing/ToolTipManager/7123767/bug7123767.java b/test/javax/swing/ToolTipManager/7123767/bug7123767.java index 4c7402d390..3477cabc6a 100644 --- a/test/javax/swing/ToolTipManager/7123767/bug7123767.java +++ b/test/javax/swing/ToolTipManager/7123767/bug7123767.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,14 +21,28 @@ * questions. */ -/* @test - @bug 7123767 - @summary Wrong tooltip location in Multi-Monitor configurations - @author Vladislav Karnaukhov - @run main bug7123767 -*/ - -import sun.awt.SunToolkit; +/* + * @test + * @bug 7123767 + * + * @summary Check if a tooltip location in Multi-Monitor + * configurations is correct. + * If the configurations number per device exceeds 5, + * then some 5 random configurations will be checked. + * Please Use -Dseed=X to set the random generator seed + * (if necessary). + * + * @author Vladislav Karnaukhov + * + * @key headful + * @key randomness + * + * @modules java.desktop/sun.awt + * @library /lib/testlibrary/ + * @build jdk.testlibrary.* + * + * @run main/timeout=300 bug7123767 + */ import javax.swing.*; import javax.swing.plaf.metal.MetalLookAndFeel; @@ -36,8 +50,50 @@ import java.awt.*; import java.awt.event.MouseEvent; import java.lang.reflect.InvocationTargetException; +import java.util.List; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Random; + +import jdk.testlibrary.RandomFactory; + + public class bug7123767 extends JFrame { + // maximum number of GraphicsConfigurations checked per GraphicsDevice + private static final int MAX_N_CONFIGS = 5; + private static final List<GraphicsConfiguration> CONFIGS = getConfigs(); + + private static List<GraphicsConfiguration> getConfigs() { + + Random rnd = RandomFactory.getRandom(); + + List<GraphicsConfiguration> configs = new ArrayList<>(); + + GraphicsEnvironment ge = + GraphicsEnvironment.getLocalGraphicsEnvironment(); + GraphicsDevice[] devices = ge.getScreenDevices(); + + for (GraphicsDevice device : devices) { + GraphicsConfiguration[] allConfigs = device.getConfigurations(); + int nConfigs = allConfigs.length; + if (nConfigs <= MAX_N_CONFIGS) { + Collections.addAll(configs, allConfigs); + } else { // see JDK-8159454 + System.out.println("check only " + MAX_N_CONFIGS + + " configurations for device " + device); + configs.add(device.getDefaultConfiguration()); // check default + for (int j = 0; j < MAX_N_CONFIGS - 1; j++) { + int k = rnd.nextInt(nConfigs); + configs.add(allConfigs[k]); + } + } + } + + return configs; + } + + private static class TestFactory extends PopupFactory { private static TestFactory newFactory = new TestFactory(); @@ -61,15 +117,21 @@ public class bug7123767 extends JFrame { } // Actual test happens here + @Override public Popup getPopup(Component owner, Component contents, int x, int y) { - GraphicsConfiguration mouseGC = testGC(MouseInfo.getPointerInfo().getLocation()); + + GraphicsConfiguration mouseGC = + testGC(MouseInfo.getPointerInfo().getLocation()); + if (mouseGC == null) { - throw new RuntimeException("Can't find GraphicsConfiguration that mouse pointer belongs to"); + throw new RuntimeException("Can't find GraphicsConfiguration " + + "that mouse pointer belongs to"); } GraphicsConfiguration tipGC = testGC(new Point(x, y)); if (tipGC == null) { - throw new RuntimeException("Can't find GraphicsConfiguration that tip belongs to"); + throw new RuntimeException( + "Can't find GraphicsConfiguration that tip belongs to"); } if (!mouseGC.equals(tipGC)) { @@ -80,17 +142,14 @@ public class bug7123767 extends JFrame { } private static GraphicsConfiguration testGC(Point pt) { - GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment(); - GraphicsDevice[] devices = environment.getScreenDevices(); - for (GraphicsDevice device : devices) { - GraphicsConfiguration[] configs = device.getConfigurations(); - for (GraphicsConfiguration config : configs) { - Rectangle rect = config.getBounds(); - Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config); - adjustInsets(rect, insets); - if (rect.contains(pt)) - return config; - } + + for (GraphicsConfiguration config: CONFIGS) { + + Rectangle rect = config.getBounds(); + Insets insets = + Toolkit.getDefaultToolkit().getScreenInsets(config); + adjustInsets(rect, insets); + if (rect.contains(pt)) { return config; } } return null; @@ -102,15 +161,18 @@ public class bug7123767 extends JFrame { private static Robot robot; public static void main(String[] args) throws Exception { + UIManager.setLookAndFeel(new MetalLookAndFeel()); setUp(); testToolTip(); TestFactory.uninstall(); + if (frame != null) { frame.dispose(); } } // Creates a window that is stretched across all available monitors // and adds itself as ContainerListener to track tooltips drawing private bug7123767() { + super(); ToolTipManager.sharedInstance().setInitialDelay(0); @@ -134,17 +196,16 @@ public class bug7123767 extends JFrame { pack(); Rectangle rect = new Rectangle(); - GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment(); - GraphicsDevice[] devices = environment.getScreenDevices(); - for (GraphicsDevice device : devices) { - GraphicsConfiguration[] configs = device.getConfigurations(); - for (GraphicsConfiguration config : configs) { - Insets localInsets = Toolkit.getDefaultToolkit().getScreenInsets(config); - Rectangle localRect = config.getBounds(); - adjustInsets(localRect, localInsets); - rect.add(localRect); - } + + for (GraphicsConfiguration config: CONFIGS) { + + Insets localInsets = + Toolkit.getDefaultToolkit().getScreenInsets(config); + Rectangle localRect = config.getBounds(); + adjustInsets(localRect, localInsets); + rect.add(localRect); } + setBounds(rect); } @@ -160,38 +221,37 @@ public class bug7123767 extends JFrame { // Moves mouse pointer to the corners of every GraphicsConfiguration private static void testToolTip() throws AWTException { - SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); - toolkit.realSync(); - GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment(); - GraphicsDevice[] devices = environment.getScreenDevices(); - for (GraphicsDevice device : devices) { - GraphicsConfiguration[] configs = device.getConfigurations(); - for (GraphicsConfiguration config : configs) { - Rectangle rect = config.getBounds(); - Insets insets = toolkit.getScreenInsets(config); - adjustInsets(rect, insets); + robot = new Robot(); + robot.setAutoDelay(20); + robot.waitForIdle(); - // Upper left - glide(rect.x + rect.width / 2, rect.y + rect.height / 2, - rect.x + MARGIN, rect.y + MARGIN); - toolkit.realSync(); - - // Lower left - glide(rect.x + rect.width / 2, rect.y + rect.height / 2, - rect.x + MARGIN, rect.y + rect.height - MARGIN); - toolkit.realSync(); - - // Upper right - glide(rect.x + rect.width / 2, rect.y + rect.height / 2, - rect.x + rect.width - MARGIN, rect.y + MARGIN); - toolkit.realSync(); - - // Lower right - glide(rect.x + rect.width / 2, rect.y + rect.height / 2, - rect.x + rect.width - MARGIN, rect.y + rect.height - MARGIN); - toolkit.realSync(); - } + for (GraphicsConfiguration config: CONFIGS) { + + Rectangle rect = config.getBounds(); + Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config); + adjustInsets(rect, insets); + + // Upper left + glide(rect.x + rect.width / 2, rect.y + rect.height / 2, + rect.x + MARGIN, rect.y + MARGIN); + robot.waitForIdle(); + + // Lower left + glide(rect.x + rect.width / 2, rect.y + rect.height / 2, + rect.x + MARGIN, rect.y + rect.height - MARGIN); + robot.waitForIdle(); + + // Upper right + glide(rect.x + rect.width / 2, rect.y + rect.height / 2, + rect.x + rect.width - MARGIN, rect.y + MARGIN); + robot.waitForIdle(); + + // Lower right + glide(rect.x + rect.width / 2, rect.y + rect.height / 2, + rect.x + rect.width - MARGIN, rect.y + rect.height - MARGIN); + + robot.waitForIdle(); } } diff --git a/test/jbProblemsList.txt b/test/jbProblemsList.txt index 85521c01ee..dacc222261 100644 --- a/test/jbProblemsList.txt +++ b/test/jbProblemsList.txt @@ -215,10 +215,6 @@ java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java generi # https://bugs.openjdk.java.net/browse/JDK-7156130 java/awt/Focus/ToFrontFocusTest/ToFrontFocus.html generic-all -# http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6848810 -# https://bugs.openjdk.java.net/browse/JDK-7035459 -java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java generic-all - # https://bugs.openjdk.java.net/browse/JDK-6986253 java/awt/Focus/TypeAhead/TestFocusFreeze.java windows-all @@ -237,9 +233,6 @@ java/awt/FontClass/CreateFont/bigfont.html generic-all # https://bugs.openjdk.java.net/browse/JDK-8076151 java/awt/FontClass/CreateFont/fileaccess/FontFile.java generic-all -# https://bugs.openjdk.java.net/browse/JDK-8080953 -java/awt/FontClass/DebugFonts.java generic-all - # https://bugs.openjdk.java.net/browse/JDK-8169111 java/awt/Frame/InvisibleOwner/InvisibleOwner.java generic-all @@ -331,9 +324,6 @@ java/awt/List/NofocusListDblClickTest/NofocusListDblClickTest.java generic-all # https://bugs.openjdk.java.net/browse/JDK-7037728 java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java linux-all -# https://bugs.openjdk.java.net/browse/JDK-8068305 -java/awt/Mixing/HWDisappear.java generic-all - # https://bugs.openjdk.java.net/browse/JDK-8143295 java/awt/Mixing/LWPopupMenu.java generic-all @@ -373,8 +363,6 @@ java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java generic-all java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java generic-all java/awt/Mouse/EnterExitEvents/DragWindowTest.java generic-all -## https://bugs.openjdk.java.net/browse/JDK-7087869 -#fix was backported # https://bugs.openjdk.java.net/browse/JDK-8169534 java/awt/Mouse/ExtraMouseClick/ExtraMouseClick.html generic-all @@ -429,17 +417,11 @@ java/awt/Paint/ExposeOnEDT.java windows-all # https://bugs.openjdk.java.net/browse/JDK-8028000 java/awt/Paint/PaintNativeOnUpdate.java generic-all -# https://bugs.openjdk.java.net/browse/JDK-8031422 -java/awt/Paint/bug8024864.java generic-all - # excluded from regular runs since the test was not run # see http://download.java.net/openjdk/testresults/8/ java/awt/ScrollPane/ScrollPanePreferredSize/ScrollPanePreferredSize.java generic-all java/awt/ScrollPane/bug8077409Test.java generic-all -# https://bugs.openjdk.java.net/browse/JDK-8140329 -java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java generic-all - # https://bugs.openjdk.java.net/browse/JDK-8159592 java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java generic-all @@ -481,9 +463,6 @@ java/awt/Window/GrabSequence/GrabSequence.java generic-all # https://bugs.openjdk.java.net/browse/JDK-8051857 java/awt/Window/WindowType/WindowType.java linux-all -# https://bugs.openjdk.java.net/browse/JDK-8137087 -java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh windows-all - # https://bugs.openjdk.java.net/browse/JDK-8080982 java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java generic-all @@ -626,10 +605,6 @@ java/awt/print/PrinterJob/ExceptionTest.java generic-all java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java generic-all java/awt/print/PrinterJob/PrtException.java generic-all -## https://bugs.openjdk.java.net/browse/JDK-8172009 -# fix was backported -#java/awt/print/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java macosx-all - # https://bugs.openjdk.java.net/browse/JDK-8152944 https://bugs.openjdk.java.net/browse/JDK-8152944 excluded from regular runs @@ -662,9 +637,6 @@ java/time/test/java/time/temporal/TestChronoUnit.java generic-all java/time/test/java/time/temporal/TestDateTimeValueRange.java generic-all -## https://bugs.openjdk.java.net/browse/JDK-6560348 -## https://bugs.openjdk.java.net/browse/JDK-7146533 -# fix was backported # https://bugs.openjdk.java.net/browse/JDK-8144247 java/awt/xembed/server/RunTestXEmbed.java generic-all @@ -788,10 +760,6 @@ demo/jvmti/mtrace/TraceJFrame.java generic-all demo/jvmti/versionCheck/FailsWhenJvmtiVersionDiffers.java generic-all demo/jvmti/waiters/WaitersTest.java generic-all -# https://bugs.openjdk.java.net/browse/JDK-8151352 -sample/chatserver/ChatTest.java generic-all -sample/mergesort/MergeSortTest.java generic-all - # 8027973 javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java windows-all @@ -829,10 +797,6 @@ java/net/PortUnreachableException/OneExceptionOnly.java windows-all sun/net/InetAddress/nameservice/simple/CacheTest.java generic-all sun/net/InetAddress/nameservice/simple/DefaultCaching.java generic-all -## https://bugs.openjdk.java.net/browse/JDK-8041924 -# fix was backported -#sun/net/www/http/ChunkedOutputStream/checkError.java linux-all - # https://bugs.openjdk.java.net/browse/JDK-8146257 sun/net/www/protocol/jar/B4957695.java generic-all @@ -1086,8 +1050,6 @@ javax/swing/JPopupMenu/7156657/bug7156657.java generic-all # https://bugs.openjdk.java.net/browse/JDK-8064920 javax/swing/JRadioButton/8033699/bug8033699.java generic-all -## https://bugs.openjdk.java.net/browse/JDK-8130430 -# fix was backported # https://bugs.openjdk.java.net/browse/JDK-8136371 javax/swing/JRadioButton/8075609/bug8075609.java generic-all @@ -1101,10 +1063,6 @@ javax/swing/JScrollBar/4708809/bug4708809.java generic-all ## https://bugs.openjdk.java.net/browse/JDK-8024407 #javax/swing/JScrollBar/7163696/Test7163696.java macosx-all -## https://bugs.openjdk.java.net/browse/JDK-8028618 -# fix was backported -#javax/swing/JScrollBar/bug4202954/bug4202954.java windows-all - # https://bugs.openjdk.java.net/browse/JDK-8169960 javax/swing/JScrollPane/HorizontalMouseWheelOnShiftPressed/HorizontalMouseWheelOnShiftPressed.java windows-all @@ -1179,32 +1137,21 @@ javax/swing/SpringLayout/4726194/bug4726194.java macosx-all # https://bugs.openjdk.java.net/browse/JDK-8172064 javax/swing/SwingUtilities/4917669/bug4917669.java windows-all -## https://bugs.openjdk.java.net/browse/JDK-7195187 -#fix was backported # https://bugs.openjdk.java.net/browse/JDK-8072110 javax/swing/SwingUtilities/7088744/bug7088744.java generic-all # https://bugs.openjdk.java.net/browse/JDK-8079253 javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java linux-all -# https://bugs.openjdk.java.net/browse/JDK-8159454 -javax/swing/ToolTipManager/7123767/bug7123767.java generic-all - # https://bugs.openjdk.java.net/browse/JDK-8167009 javax/swing/ToolTipManager/Test6256140.java generic-all -## https://bugs.openjdk.java.net/browse/JDK-8081764 -# fix was backported -#javax/swing/plaf/aqua/CustomComboBoxFocusTest.java generic-all - # https://bugs.openjdk.java.net/browse/JDK-8042383 javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java generic-all # https://bugs.openjdk.java.net/browse/JDK-8137101 javax/swing/plaf/basic/BasicHTML/4251579/bug4251579.java generic-all -## https://bugs.openjdk.java.net/browse/JDK-8079450 -# fix was backported # https://bugs.openjdk.java.net/browse/JDK-8140237 javax/swing/plaf/nimbus/8041642/bug8041642.java generic-all @@ -1336,10 +1283,6 @@ sun/awt/datatransfer/SuplementaryCharactersTransferTest.java generic-all # https://bugs.openjdk.java.net/browse/JDK-8142540 sun/awt/dnd/8024061/bug8024061.java linux-all -## https://bugs.openjdk.java.net/browse/JDK-8042098 -# fix was backported -#sun/java2d/AcceleratedXORModeTest.java windows-all - # https://bugs.openjdk.java.net/browse/JDK-8172888 sun/java2d/DirectX/InfiniteValidationLoopTest/InfiniteValidationLoopTest.java windows-all diff --git a/test/sample/chatserver/ChatTest.java b/test/sample/chatserver/ChatTest.java index 9cb2daa70c..0cb2351b14 100644 --- a/test/sample/chatserver/ChatTest.java +++ b/test/sample/chatserver/ChatTest.java @@ -25,7 +25,7 @@ /* @test * @summary Test chat server chatserver test * - * @library /src/share/sample/nio/chatserver + * @library /src/sample/share/nio/chatserver * @build ChatTest ChatServer Client ClientReader DataReader MessageReader NameReader * @run testng ChatTest */ @@ -358,8 +358,8 @@ public class ChatTest { @Override public void run() { try (Socket socket = new Socket("localhost", listeningPort); - BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); - Writer writer = new FlushingWriter(new OutputStreamWriter(socket.getOutputStream()))) { + BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); + Writer writer = new FlushingWriter(new OutputStreamWriter(socket.getOutputStream()))) { socket.setTcpNoDelay(true); run(socket, reader, writer); diff --git a/test/sample/mergesort/MergeSortTest.java b/test/sample/mergesort/MergeSortTest.java index 53b5252eb9..5a34a86760 100644 --- a/test/sample/mergesort/MergeSortTest.java +++ b/test/sample/mergesort/MergeSortTest.java @@ -25,7 +25,7 @@ /* @test * @summary Test MergeSort * - * @library /src/share/sample/forkjoin/mergesort + * @library /src/sample/share/forkjoin/mergesort * @build MergeSortTest MergeDemo MergeSort * @run testng MergeSortTest */ @@ -75,7 +75,7 @@ public class MergeSortTest { target.sort(array); assertEqual(copy, array); } - } + } private void testSortEmpty() { int[] array = { }; @@ -102,4 +102,4 @@ public class MergeSortTest { } -} +}
\ No newline at end of file |