Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jdk17u
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
openjdk
jdk17u
Commits
f8a119b5
Commit
f8a119b5
authored
6 months ago
by
Goetz Lindenmaier
Browse files
Options
Downloads
Patches
Plain Diff
8327924: Simplify TrayIconScalingTest.java
Backport-of: 1496b5de9004c6a9e43ead5f6e9e88362028a7cc
parent
915cc663
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java
+16
-17
16 additions, 17 deletions
test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java
with
16 additions
and
17 deletions
test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java
+
16
−
17
View file @
f8a119b5
...
...
@@ -85,28 +85,27 @@ public class TrayIconScalingTest {
System
.
out
.
println
(
"SystemTray is not supported"
);
return
;
}
PassFailJFrame
passFailJFrame
=
PassFailJFrame
.
builder
()
createAndShowTrayIcon
();
try
{
PassFailJFrame
.
builder
()
.
title
(
"TrayIcon Test Instructions"
)
.
instructions
(
INSTRUCTIONS
)
.
testTimeOut
(
8
)
.
rows
(
25
)
.
columns
(
70
)
.
screenCapture
()
.
build
();
createAndShowGUI
();
// does not have a test window,
// hence only the instruction frame is positioned
PassFailJFrame
.
positionTestWindow
(
null
,
PassFailJFrame
.
Position
.
HORIZONTAL
);
try
{
passFailJFrame
.
awaitAndCheck
();
.
build
()
.
awaitAndCheck
();
}
finally
{
if
(
tray
!=
null
)
{
tray
.
remove
(
icon
);
}
}
}
private
static
void
createAndShow
GUI
()
{
private
static
void
createAndShow
TrayIcon
()
{
ArrayList
<
Image
>
imageList
=
new
ArrayList
<>();
for
(
int
size
=
16
;
size
<=
48
;
size
+=
4
)
{
imageList
.
add
(
createIcon
(
size
));
...
...
@@ -120,7 +119,7 @@ public class TrayIconScalingTest {
try
{
tray
.
add
(
icon
);
}
catch
(
AWTException
e
)
{
throw
new
RuntimeException
(
"Error while adding icon to system tray"
);
throw
new
RuntimeException
(
"Error while adding icon to system tray"
,
e
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment