Skip to content
Permalink
Browse files
8248352: [TEST_BUG] Test test/jdk/java/awt/font/TextLayout/ArabicDiac…
…riticTest.java can leave frame open

Reviewed-by: prr, serb, aivanov
  • Loading branch information
skodanda authored and aivanov-jdk committed Sep 22, 2020
1 parent ae20dd6 commit aa3862403bf5977844e1c362494619f44ce069dc
Showing with 7 additions and 9 deletions.
  1. +7 −9 test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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
@@ -22,9 +22,8 @@
*/

/* @test
* @key headful
* @summary verify Arab Diacritic Positioning
* @bug 8168759
* @bug 8168759 8248352
*/

import java.awt.Font;
@@ -46,19 +45,18 @@ public class ArabicDiacriticTest {
static final String STR1 = "\u0644\u0639\u064e\u0629";
static final String STR2 = "\u0644\u0639\u0629";

static JFrame frame;
static final String FONT = "DejaVu Sans";

public static void main(String args[]) throws Exception {
showText(); // for a human
public static void main(String[] args) throws Exception {
if ((args.length > 0) && (args[0].equals("-show"))) {
showText(); // for a human
}
measureText(); // for the test harness
Thread.sleep(5000);
frame.dispose();
}

static void showText() {
SwingUtilities.invokeLater(() -> {
frame = new JFrame();
JFrame frame = new JFrame();
JLabel label = new JLabel(SAMPLE);
Font font = new Font(FONT, Font.PLAIN, 36);
label.setFont(font);

1 comment on commit aa38624

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on aa38624 Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.