8186513: [TESTBUG] javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java
Reviewed-by: jdv, sveerabhadra
--- a/test/jdk/ProblemList.txt Tue Feb 27 21:53:06 2018 +0000
+++ b/test/jdk/ProblemList.txt Wed Feb 28 12:07:31 2018 +0530
@@ -620,7 +620,6 @@
javax/swing/border/Test6981576.java 8198339 generic-all
javax/swing/JComponent/7154030/bug7154030.java 7190978 generic-all
-javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java 8186513 generic-all
javax/swing/JComboBox/ConsumedKeyTest/ConsumedKeyTest.java 8067986 generic-all
javax/swing/JComponent/6683775/bug6683775.java 8172337 generic-all
javax/swing/JComboBox/6236162/bug6236162.java 8028707 windows-all,macosx-all
--- a/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java Tue Feb 27 21:53:06 2018 +0000
+++ b/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java Wed Feb 28 12:07:31 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -36,7 +36,7 @@
/**
* @test
* @key headful
- * @bug 8160248 8160332
+ * @bug 8160248 8160332 8186513
* @summary Dragged internal frame leaves artifacts for floating point ui scale
* @run main/othervm -Dsun.java2d.uiScale=1.2 JInternalFrameDraggingTest
* @run main/othervm -Dsun.java2d.uiScale=1.5 JInternalFrameDraggingTest
@@ -69,10 +69,14 @@
BufferedImage img = robot.createScreenCapture(rect);
int testRGB = BACKGROUND_COLOR.getRGB();
- for (int i = 0; i < size; i++) {
+ for (int i = 1; i < size; i++) {
int rgbCW = img.getRGB(i, size / 2);
int rgbCH = img.getRGB(size / 2, i);
if (rgbCW != testRGB || rgbCH != testRGB) {
+ System.out.println("i " + i + " rgbCW " +
+ Integer.toHexString(rgbCW) +
+ " testRGB " + Integer.toHexString(testRGB) +
+ " rgbCH " + Integer.toHexString(rgbCH));
throw new RuntimeException("Background color is wrong!");
}
}
@@ -81,6 +85,7 @@
private static void createAndShowGUI() {
frame = new JFrame();
+ frame.setUndecorated(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());