8196099: javax/swing/text/CSSBorder/6796710/bug6796710.java fails
Reviewed-by: psadhukhan
This commit is contained in:
parent
cacce843aa
commit
fe7672bac6
@ -761,7 +761,6 @@ javax/swing/JTabbedPane/8007563/Test8007563.java 8051591 generic-all
|
||||
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922 macosx-all
|
||||
javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all
|
||||
javax/swing/plaf/basic/Test6984643.java 8198340 windows-all
|
||||
javax/swing/text/CSSBorder/6796710/bug6796710.java 8196099 windows-all
|
||||
javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java 8194048 windows-all
|
||||
javax/swing/text/DefaultCaret/HidingSelection/MultiSelectionTest.java 8213562 linux-all
|
||||
javax/swing/text/JTextComponent/5074573/bug5074573.java 8196100 windows-all
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2020, 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
|
||||
@ -28,12 +28,23 @@
|
||||
* @summary Html content in JEditorPane is overlapping on swing components while resizing the application.
|
||||
* @library ../../../regtesthelpers
|
||||
* @build Util
|
||||
@run main bug6796710
|
||||
* @run main/othervm -Dsun.java2d.uiScale=1 bug6796710
|
||||
*/
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Robot;
|
||||
import java.awt.image.BufferedImage;
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
public class bug6796710 {
|
||||
// The page is inlined because we want to be sure that the JEditorPane filled synchronously
|
||||
@ -89,6 +100,7 @@ public class bug6796710 {
|
||||
|
||||
frame.setContentPane(pnContent);
|
||||
frame.setSize(400, 600);
|
||||
frame.setLocationRelativeTo(null);
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
frame.setVisible(true);
|
||||
}
|
||||
@ -113,7 +125,10 @@ public class bug6796710 {
|
||||
// On Linux platforms realSync doesn't guaranties setSize completion
|
||||
Thread.sleep(1000);
|
||||
|
||||
if (!Util.compareBufferedImages(bufferedImage, getPnBottomImage())) {
|
||||
BufferedImage pnBottomImage = getPnBottomImage();
|
||||
if (!Util.compareBufferedImages(bufferedImage, pnBottomImage)) {
|
||||
ImageIO.write(bufferedImage, "png", new File("bufferedImage.png"));
|
||||
ImageIO.write(pnBottomImage, "png", new File("pnBottomImage.png"));
|
||||
throw new RuntimeException("The test failed");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user