Re: RFR: 8340466: Add description for PassFailJFrame constructors [v3]

2024-09-25 Thread Alexey Ivanov
provides a more streamlined experience, therefore new tests > should use it instead of constructors. We may update the tests which use the > constructors, after which the constructors can be removed. Alexey Ivanov has updated the pull request incrementally with two additional commits s

Re: RFR: 8340466: Add description for PassFailJFrame constructors [v2]

2024-09-25 Thread Alexey Ivanov
On Tue, 24 Sep 2024 17:20:57 GMT, Phil Race wrote: >> Alexey Ivanov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use EDT abbreviation in constructor description >> >> The term EDT (Eve

Re: RFR: 8340466: Add description for PassFailJFrame constructors [v2]

2024-09-25 Thread Alexey Ivanov
On Tue, 24 Sep 2024 23:36:17 GMT, Harshitha Onkar wrote: > > Shall we deprecate the constructors in favor of Builder? > > > > The builder provides a more streamlined experience, therefore new tests > > should use it instead of constructors. We may update the tests which use > > the constructors

Re: RFR: 8340466: Add description for PassFailJFrame constructors [v2]

2024-09-24 Thread Alexey Ivanov
provides a more streamlined experience, therefore new tests > should use it instead of constructors. We may update the tests which use the > constructors, after which the constructors can be removed. Alexey Ivanov has updated the pull request incrementally with one additional commit since

Re: RFR: 8340785: Update description of PassFailJFrame and samples

2024-09-24 Thread Alexey Ivanov
On Tue, 24 Sep 2024 15:51:09 GMT, Alexey Ivanov wrote: > I re-worked the entire description of `PassFailJFrame`: > > Add description of what UI elements it provides and how to interact with them. > Add anchors for linking to the sections. > > Use `{@snippet}` instead of `{

RFR: 8340785: Update description of PassFailJFrame and samples

2024-09-24 Thread Alexey Ivanov
I re-worked the entire description of `PassFailJFrame`: Add description of what UI elements it provides and how to interact with them. Add anchors for linking to the sections. Use `{@snippet}` instead of `{@code}` for sample code. Use method references instead of lambdas in samples. Document requ

RFR: 8340466: Add descriptions for PassFailJFrame constructors

2024-09-23 Thread Alexey Ivanov
I added description to all the constructors available in `PassFailJFrame`. I generated the javadoc for it: [`PassFailJFrame/api`](https://cr.openjdk.org/~aivanov/PassFailJFrame/api/PassFailJFrame.html) which is easier to read. This hosted javadoc could be used as a reference to its API. The co

Integrated: 8340365: Position the first window of a window list

2024-09-23 Thread Alexey Ivanov
On Wed, 18 Sep 2024 12:05:22 GMT, Alexey Ivanov wrote: > Support of multiple test UI windows in `PassFailJFrame` is still evolving. > After [JDK-8340210](https://bugs.openjdk.org/browse/JDK-8340210), the > `Builder` has a method `positionTestUI` to supply an implementati

Integrated: 8340461: Amend description for logArea

2024-09-23 Thread Alexey Ivanov
On Mon, 23 Sep 2024 14:30:30 GMT, Alexey Ivanov wrote: > Resolve the error: > > PassFailJFrame.java:161: error: text not allowed in element > * to add a log area, > ^ > > > Shorten the rendered javadoc for `log`, `logClear` and

Re: RFR: 8340365: Position the first window of a window list

2024-09-23 Thread Alexey Ivanov
On Wed, 18 Sep 2024 20:12:08 GMT, Alexey Ivanov wrote: > > > With the proposed change in this pull request, the implementation would > > > use ComponentListener.componentMoved: > > > > > > you mean the implementation of the test ? Perhaps adding the require

RFR: 8340461: Amend description for logArea

2024-09-23 Thread Alexey Ivanov
Resolve the error: PassFailJFrame.java:161: error: text not allowed in element * to add a log area, ^ Shorten the rendered javadoc for `log`, `logClear` and `logSet`. @azvegint, could you take a look? - Commit messages: - 8340461: Amend desc

Re: RFR: 8340365: Position the first window of a window list

2024-09-23 Thread Alexey Ivanov
On Wed, 18 Sep 2024 20:52:23 GMT, Alexey Ivanov wrote: > > Perhaps adding the required pattern in the examples would be a good idea. > > Yes, it's a good idea. Although, I support this, I feel it is out of scope for this change. I submitted [JDK-8340469](https://bugs.openj

Re: RFR: 7188058: Background of TextComponents are not changing colors to the default disabled color when set to uneditable [v5]

2024-09-23 Thread Alexey Ivanov
On Tue, 20 Aug 2024 23:53:45 GMT, Alisen Chung wrote: >> Currently the bug described in the issue is that the colors of the >> TextComponents do not change when setting TextComponents to uneditable. The >> default uneditable color (SystemColor.control) happens to be the same as the >> default

Re: RFR: 7188058: Background of TextComponents are not changing colors to the default disabled color when set to uneditable [v5]

2024-09-23 Thread Alexey Ivanov
On Fri, 23 Aug 2024 05:24:16 GMT, Abhishek Kumar wrote: >> Alisen Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix import > > src/java.desktop/share/classes/java/awt/TextArea.java line 610: > >> 608: >> 609: @Override >> 6

Re: RFR: 7188058: Background of TextComponents are not changing colors to the default disabled color when set to uneditable [v5]

2024-09-23 Thread Alexey Ivanov
On Tue, 20 Aug 2024 23:53:45 GMT, Alisen Chung wrote: >> Currently the bug described in the issue is that the colors of the >> TextComponents do not change when setting TextComponents to uneditable. The >> default uneditable color (SystemColor.control) happens to be the same as the >> default

Re: RFR: 7188058: Background of TextComponents are not changing colors to the default disabled color when set to uneditable [v2]

2024-09-23 Thread Alexey Ivanov
On Thu, 8 Aug 2024 01:19:55 GMT, Alisen Chung wrote: >> Yes, but as far I could see `TextArea.background` property is being set in >> `AquaLookAndFeel.java, MotifLookAndFeel.java, BasicLookAndFeel.java, >> XAWTLookAndFeel.java and WindowsLookAndFeel.java` >> and this L&F will not be set in AWT

Re: RFR: 7188058: Background of TextComponents are not changing colors to the default disabled color when set to uneditable [v5]

2024-09-23 Thread Alexey Ivanov
On Fri, 23 Aug 2024 04:26:30 GMT, Prasanta Sadhukhan wrote: > Also, since the testcase is just testing the background color, I think it can > be made automated and even headless by using textfield/textarea rendering to > BufferedImage AWT components cannot be created in headless environment.

Re: RFR: 8333403: Write a test to check various components events are triggered properly [v11]

2024-09-23 Thread Alexey Ivanov
On Mon, 23 Sep 2024 04:19:20 GMT, Ravi Gupta wrote: >> This testcase checks for the following assertions for Component events: >> >> 1. When components are resized, moved, hidden and shown the respective >> events are triggered. >> 2. When the components are hidden/disabled also,the component e

Re: RFR: 8337287: Update image in javax.swing.text.Document.insert

2024-09-22 Thread Alexey Ivanov
On Mon, 29 Jul 2024 13:43:42 GMT, Alexey Ivanov wrote: > This changeset updates the image in the documentation for the > `Document.insert` method. The image in `Document.remove` was updated by > [JDK-4622866](https://bugs.openjdk.org/browse/JDK-4622866) in PR #15701. > > Now t

Re: RFR: 8337287: Update image in javax.swing.text.Document.insert [v2]

2024-09-22 Thread Alexey Ivanov
or JDK > 24](https://cr.openjdk.org/~aivanov/8337287/api/java.desktop/javax/swing/text/Document.html#insertString(int,java.lang.String,javax.swing.text.AttributeSet)). > > As in the case with `remove`, I marked up to classes and members with {@code}. Alexey Ivanov has updated the pull requ

Re: RFR: 8333403: Write a test to check various components events are triggered properly [v10]

2024-09-20 Thread Alexey Ivanov
On Wed, 18 Sep 2024 15:34:02 GMT, Ravi Gupta wrote: >> This testcase checks for the following assertions for Component events: >> >> 1. When components are resized, moved, hidden and shown the respective >> events are triggered. >> 2. When the components are hidden/disabled also,the component e

Integrated: 8340008: KeyEvent/KeyTyped/Numpad1KeyTyped.java has 15 seconds timeout

2024-09-20 Thread Alexey Ivanov
On Thu, 19 Sep 2024 09:40:56 GMT, Alexey Ivanov wrote: > I am open-sourcing the `Numpad1KeyTyped.java` test. > > I used `CountDownLatch` for synchronisation. > > The test passes in CI. This pull request has now been integrated. Changeset: 3c22d83c Author: Alexey Ivanov UR

Re: RFR: 8339524: Clean up ExtendedRobot tests

2024-09-20 Thread Alexey Ivanov
On Wed, 4 Sep 2024 03:34:34 GMT, Alisen Chung wrote: > Cleaning up tests building ExtendedRobot that shouldn't be. The title suggest a larger amount of clean-up. “Clean up _a few_ tests” could be better. (Git recommends the use of imperative mood in titles: “Clean up” instead of “Cleaning up”,

Re: RFR: 8339524: Clean up ExtendedRobot tests

2024-09-20 Thread Alexey Ivanov
On Wed, 4 Sep 2024 03:34:34 GMT, Alisen Chung wrote: > Cleaning up tests building ExtendedRobot that shouldn't be. Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JInternalFrame/6725409/bug6725409.java line 1: > 1: /* `frame` should be disposed of on EDT. `TestTitlePane` can be

Re: RFR: 8339972: Make a few fields in SortingFocusTraversalPolicy static

2024-09-20 Thread Alexey Ivanov
On Thu, 25 Jul 2024 11:17:23 GMT, Andrey Turbanov wrote: > 2 fields in javax.swing.SortingFocusTraversalPolicy could be made 'static': > 1. FORWARD_TRAVERSAL = 0 > 2. BACKWARD_TRAVERSAL = 1 Marked as reviewed by aivanov (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/2032

Integrated: 8340308: PassFailJFrame: Make rows default to number of lines in instructions

2024-09-19 Thread Alexey Ivanov
On Tue, 17 Sep 2024 13:45:06 GMT, Alexey Ivanov wrote: > It has become quite common to use the following code > > > .rows((int) INSTRUCTIONS.lines().count() + 1) > > > to set the number of rows for `PassFailJFrame`. > > Make this the default value. Newer te

Re: RFR: 8340308: PassFailJFrame: Make rows default to number of lines in instructions

2024-09-19 Thread Alexey Ivanov
On Thu, 19 Sep 2024 15:10:55 GMT, Alexander Zvegintsev wrote: > As another improvement, we can also consider calculating the default number > of columns (based on the widest string?) in a separate issue. Yes! I added a comment in JBS: > This is part of a larger effort for providing better de

Re: RFR: 8339984: Open source AWT MenuItem related tests [v14]

2024-09-19 Thread Alexey Ivanov
On Thu, 19 Sep 2024 16:22:27 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Minor fix Marked as rev

Re: RFR: 8339984: Open source AWT MenuItem related tests [v13]

2024-09-19 Thread Alexey Ivanov
On Thu, 19 Sep 2024 16:08:09 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > TestFrame var declared a

Re: RFR: 8339984: Open source AWT MenuItem related tests [v11]

2024-09-19 Thread Alexey Ivanov
On Thu, 19 Sep 2024 14:55:39 GMT, Alexey Ivanov wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Test restructured and test frames set visible true > > test/jdk/java/awt/MenuItem/Lo

Re: RFR: 8339984: Open source AWT MenuItem related tests [v11]

2024-09-19 Thread Alexey Ivanov
On Thu, 19 Sep 2024 04:56:13 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Test restructured and te

Integrated: 8340306: Add border around instructions in PassFailJFrame

2024-09-19 Thread Alexey Ivanov
On Tue, 17 Sep 2024 12:39:20 GMT, Alexey Ivanov wrote: > A trivial change which adds border around instruction text. It makes the text > easier to read. > > (In some tests, people added leading spaces to each line to make the > instructions easier to read; with the added bor

Re: RFR: 8340008: KeyEvent/KeyTyped/Numpad1KeyTyped.java has 15 seconds timeout

2024-09-19 Thread Alexey Ivanov
On Thu, 19 Sep 2024 09:40:56 GMT, Alexey Ivanov wrote: > I am open-sourcing the `Numpad1KeyTyped.java` test. > > I used `CountDownLatch` for synchronisation. > > The test passes in CI. The test is somewhat similar to #21013, it uses similar synchronisation logic. --

RFR: 8340008: KeyEvent/KeyTyped/Numpad1KeyTyped.java has 15 seconds timeout

2024-09-19 Thread Alexey Ivanov
I am open-sourcing the `Numpad1KeyTyped.java` test. I used `CountDownLatch` for synchronisation. The test passes in CI. - Commit messages: - 8340008: KeyEvent/KeyTyped/Numpad1KeyTyped.java has 15 seconds timeout Changes: https://git.openjdk.org/jdk/pull/21085/files Webrev: https

Integrated: 8340007: Refactor KeyEvent/FunctionKeyTest.java

2024-09-19 Thread Alexey Ivanov
On Mon, 16 Sep 2024 09:55:19 GMT, Alexey Ivanov wrote: > This changeset refactors `java/awt/event/KeyEvent/FunctionKeyTest.java`. > > Key changes: > > - Use `CyclicBarrier` to verify whether a key is pressed and released; > - Use `CountDownLatch` for frame activation; > -

Re: RFR: 8340365: Position the first window of a window list

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 20:12:08 GMT, Alexey Ivanov wrote: > Perhaps adding the required pattern in the examples would be a good idea. Yes, it's a good idea. - PR Comment: https://git.openjdk.org/jdk/pull/21057#issuecomment-2359383555

Re: RFR: 8340365: Position the first window of a window list

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 19:42:08 GMT, Phil Race wrote: > > With the proposed change in this pull request, the implementation would use > > ComponentListener.componentMoved: > > you mean the implementation of the test ? Perhaps adding the required pattern > in the examples would be a good idea. @p

Re: RFR: 8339984: Open source AWT MenuItem related tests [v10]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 15:07:57 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Test instruction update

Re: RFR: 8339984: Open source AWT MenuItem related tests [v10]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 15:07:57 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Test instruction update

Re: RFR: 8339984: Open source AWT MenuItem related tests [v8]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 12:38:34 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > added requires jtreg tag

Re: RFR: 8339984: Open source AWT MenuItem related tests [v8]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 12:38:34 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > added requires jtreg tag

Re: RFR: 8339845: Update color.org and wapforum.org links to use HTTPS instead of HTTP

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 11:07:29 GMT, Nizar Benalla wrote: > I assumed this would be automatically merged once I became a committer. No, the Skara bots don't revisit the PRs after the OpenJDK Census is changed. You weren't a committer when you issued the `/integrate` command, so it required a spon

Re: RFR: 8339984: Open source AWT MenuItem related tests [v6]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 10:52:28 GMT, Alexey Ivanov wrote: > > Actually, I thought `.positionTestWindow` would be called for the first > > window automatically, then you can position other windows based on the > > assigned location. Eventually, it's not called at all if a

Re: RFR: 8339984: Open source AWT MenuItem related tests [v3]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 12:06:31 GMT, Abhishek Kumar wrote: >>>What about macOS? The test can be run there. >> >> On macOS, it is of the normal font like windows. Should I update the >> instructions for macOS as well? > >>I'm for replacing Solaris with Linux. There's no way a test would be run on

Re: RFR: 8340365: Position the first window of a window list

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 12:05:22 GMT, Alexey Ivanov wrote: > Support of multiple test UI windows in `PassFailJFrame` is still evolving. > After [JDK-8340210](https://bugs.openjdk.org/browse/JDK-8340210), the > `Builder` has a method `positionTestUI` to supply an implementati

RFR: 8340365: Position the first window of a window list

2024-09-18 Thread Alexey Ivanov
Support of multiple test UI windows in `PassFailJFrame` is still evolving. After [JDK-8340210](https://bugs.openjdk.org/browse/JDK-8340210), the `Builder` has a method `positionTestUI` to supply an implementation of the `PositionWindows` interface which handles the positioning of all test UI wi

Re: RFR: 8339984: Open source AWT MenuItem related tests [v3]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 10:48:23 GMT, Abhishek Kumar wrote: > > What about Linux? Solaris isn't supported by JDK any more. > > Tested on linux. Menu's font are large and on Windows it is normal size. I'm for replacing Solaris with Linux. There's no way a test would be run on Solaris using the most

Re: RFR: 8339984: Open source AWT MenuItem related tests [v5]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 11:32:55 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Review comment update L

Re: RFR: 8339984: Open source AWT MenuItem related tests [v4]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 10:51:49 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Test instruction update

Re: RFR: 8339984: Open source AWT MenuItem related tests [v4]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 10:51:49 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Test instruction update

Re: RFR: 8339984: Open source AWT MenuItem related tests [v4]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 10:51:49 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Test instruction update

Re: RFR: 8339984: Open source AWT MenuItem related tests [v4]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 10:12:27 GMT, Abhishek Kumar wrote: >> Actually, I thought `.positionTestWindow` would be called for the first >> window automatically, then you can position other windows based on the >> assigned location. Eventually, it's not called at all if a list of windows >> is creat

Re: RFR: 8339984: Open source AWT MenuItem related tests [v3]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 04:43:50 GMT, Abhishek Kumar wrote: >> Few AWT MenuItem related tests are converted from applet to manual and moved >> to open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Add requires tag Marked

Re: RFR: 8339984: Open source AWT MenuItem related tests [v3]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 04:25:55 GMT, Abhishek Kumar wrote: >> test/jdk/java/awt/MenuItem/LotsOfMenuItemsTest.java line 98: >> >>> 96: firstFrame.setLocation(970, 350); >>> 97: testFrame.setLocation(970, 510); >>> 98: } >> >> Hard-coding coordinates is not the best solution. The

Re: RFR: 8339984: Open source AWT MenuItem related tests [v3]

2024-09-18 Thread Alexey Ivanov
On Wed, 18 Sep 2024 10:07:13 GMT, Alexey Ivanov wrote: >> I gave a try to get PassFailFrame position but some error occured and then >> hard coded. I agree hard-coding is not a best solution and thanks for >> suggesting the other way around. A bit of correction in setting

Re: RFR: 8339845: Update color.org and wapforum.org links to use HTTPS instead of HTTP

2024-09-17 Thread Alexey Ivanov
On Fri, 13 Sep 2024 15:01:23 GMT, Nizar Benalla wrote: > Can I get a review for this doc-only change? I updated some links because the > websites moved from HTTP to HTTPS. The redirects can cause some > false-positives on tests. > > TIA @nizarbenalla Looks you're a committer now. You have to

Re: RFR: 8339845: Update color.org and wapforum.org links to use HTTPS instead of HTTP

2024-09-17 Thread Alexey Ivanov
On Fri, 13 Sep 2024 15:01:23 GMT, Nizar Benalla wrote: > Can I get a review for this doc-only change? I updated some links because the > websites moved from HTTP to HTTPS. The redirects can cause some > false-positives on tests. > > TIA Marked as reviewed by aivanov (Reviewer). -

Re: RFR: 8226933: [TEST_BUG]GTK L&F: There is no swatches or RGB tab in JColorChooser [v4]

2024-09-17 Thread Alexey Ivanov
On Fri, 6 Sep 2024 11:37:10 GMT, Abhishek Kumar wrote: >> There is no Swatches tab available for GTK Look and Feel due to the >> different ColorChooser UI design. Updated the test instructions. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the

Re: RFR: 8339984: Open source AWT MenuItem related tests

2024-09-17 Thread Alexey Ivanov
On Tue, 17 Sep 2024 04:31:09 GMT, Abhishek Kumar wrote: > Few AWT MenuItem related tests are converted from applet to manual and moved > to open. Changes requested by aivanov (Reviewer). test/jdk/java/awt/MenuItem/GiantFontTest.java line 72: > 70: mb.add(m); > 71: f.setMenuBar

Re: RFR: JDK-8340210 : Add positionTestUI() to PassFailJFrame.Builder [v3]

2024-09-17 Thread Alexey Ivanov
On Tue, 17 Sep 2024 17:25:34 GMT, Harshitha Onkar wrote: >> `positionTestUI()` option is added to PassFailJFrame (PFJ). >> >> With this change multiple UI can be positioned using the PFJ new builder >> pattern by providing implementation for the Functional Interface >> `PositionWindows.positio

Re: RFR: 8333403: Write a test to check various components events are triggered properly [v9]

2024-09-17 Thread Alexey Ivanov
On Tue, 17 Sep 2024 16:19:27 GMT, Ravi Gupta wrote: >> This testcase checks for the following assertions for Component events: >> >> 1. When components are resized, moved, hidden and shown the respective >> events are triggered. >> 2. When the components are hidden/disabled also,the component e

Re: RFR: JDK-8340210 : Add positionTestUI() to PassFailJFrame.Builder [v2]

2024-09-17 Thread Alexey Ivanov
On Mon, 16 Sep 2024 21:38:36 GMT, Harshitha Onkar wrote: >> `positionTestUI()` option is added to PassFailJFrame (PFJ). >> >> With this change multiple UI can be positioned using the PFJ new builder >> pattern by providing implementation for the Functional Interface >> `PositionWindows.positio

Re: RFR: 8340308: PassFailJFrame: Make rows default to number of lines in instructions

2024-09-17 Thread Alexey Ivanov
On Tue, 17 Sep 2024 13:45:06 GMT, Alexey Ivanov wrote: > It has become quite common to use the following code > > > .rows((int) INSTRUCTIONS.lines().count() + 1) > > > to set the number of rows for `PassFailJFrame`. > > Make this the default value. Newer te

RFR: 8340308: PassFailJFrame: Make rows default to number of lines in instructions

2024-09-17 Thread Alexey Ivanov
It has become quite common to use the following code .rows((int) INSTRUCTIONS.lines().count() + 1) to set the number of rows for `PassFailJFrame`. Make this the default value. Newer tests could drop `.rows` from builder configuration if the new default works well. If a test needs customising

Re: RFR: 8340306: Add border around instructions in PassFailJFrame

2024-09-17 Thread Alexey Ivanov
On Tue, 17 Sep 2024 12:39:20 GMT, Alexey Ivanov wrote: > A trivial change which adds border around instruction text. It makes the text > easier to read. **Updated look:** ![Screenshot of PrintLatinCJKTest with border around text](https://github.com/user-attachments/assets/93311a78-633

RFR: 8340306: Add border around instructions in PassFailJFrame

2024-09-17 Thread Alexey Ivanov
A trivial change which adds border around instruction text. It makes the text easier to read. - Commit messages: - 8340306: Add border around instructions in PassFailJFrame Changes: https://git.openjdk.org/jdk/pull/21038/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=2103

Re: RFR: JDK-8340210 : Add positionTestUI() to PassFailJFrame.Builder [v2]

2024-09-17 Thread Alexey Ivanov
On Tue, 17 Sep 2024 08:38:13 GMT, Alexander Zvegintsev wrote: > I think that this can be improved by adding some predefined positionTestUI > functions, like in the #15721 (we can borrow them from it). I agree that we should — and *we will*. Yet I don't see missing default layouts as stopper f

Re: RFR: JDK-8340210 : Add positionTestUI() to PassFailJFrame.Builder [v2]

2024-09-17 Thread Alexey Ivanov
On Mon, 16 Sep 2024 21:38:36 GMT, Harshitha Onkar wrote: >> `positionTestUI()` option is added to PassFailJFrame (PFJ). >> >> With this change multiple UI can be positioned using the PFJ new builder >> pattern by providing implementation for the Functional Interface >> `PositionWindows.positio

Re: RFR: JDK-8340210 : Add positionTestUI() to PassFailJFrame.Builder [v2]

2024-09-17 Thread Alexey Ivanov
On Mon, 16 Sep 2024 21:31:24 GMT, Harshitha Onkar wrote: >> Harshitha Onkar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> removed errorenous check > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 1277: > >> 1275:

Re: RFR: JDK-8340210 : Add positionTestUI() to PassFailJFrame.Builder [v2]

2024-09-17 Thread Alexey Ivanov
On Mon, 16 Sep 2024 21:38:36 GMT, Harshitha Onkar wrote: >> `positionTestUI()` option is added to PassFailJFrame (PFJ). >> >> With this change multiple UI can be positioned using the PFJ new builder >> pattern by providing implementation for the Functional Interface >> `PositionWindows.positio

Re: RFR: JDK-8340210 : Add positionTestUI() to PassFailJFrame builder pattern

2024-09-16 Thread Alexey Ivanov
On Mon, 16 Sep 2024 19:11:59 GMT, Harshitha Onkar wrote: > `positionTestUI()` option is added to PassFailJFrame (PFJ). > > With this change multiple UI can be positioned using the PFJ new builder > pattern by providing implementation for the Functional Interface > `PositionWindows.positionTest

Re: RFR: 8337287: Update image in javax.swing.text.Document.insert

2024-09-16 Thread Alexey Ivanov
On Mon, 16 Sep 2024 19:19:56 GMT, Alexey Ivanov wrote: > The text is positioned in the middle of the box -0.5 pixels. Moving the text position by 0.5 seems to help, and the values become equal: 7 on either side. This needs to be done for the image in `remove` too, so I'd rather

Re: RFR: 8337287: Update image in javax.swing.text.Document.insert

2024-09-16 Thread Alexey Ivanov
On Sat, 24 Aug 2024 00:11:14 GMT, Sergey Bylokhov wrote: > Just curious why the chars are not in the middle of the boxes? They're aligned according to CSS rules: text-anchor: middle; dominant-baseline: middle; The text is positioned in the middle of the box -0.5 pixel

Re: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v3]

2024-09-16 Thread Alexey Ivanov
On Mon, 9 Sep 2024 19:30:35 GMT, Alexey Ivanov wrote: >> Sergey Bylokhov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update bug4490179.java > > test/jdk/java/awt/List/KeyEventsTest/KeyEventsTest.

Re: RFR: 8340007: Refactor KeyEvent/FunctionKeyTest.java

2024-09-16 Thread Alexey Ivanov
On Mon, 16 Sep 2024 09:55:19 GMT, Alexey Ivanov wrote: > This changeset refactors `java/awt/event/KeyEvent/FunctionKeyTest.java`. > > Key changes: > > - Use `CyclicBarrier` to verify whether a key is pressed and released; > - Use `CountDownLatch` for frame activation; > -

RFR: 8340007: Refactor KeyEvent/FunctionKeyTest.java

2024-09-16 Thread Alexey Ivanov
This changeset refactors `java/awt/event/KeyEvent/FunctionKeyTest.java`. Key changes: - Use `CyclicBarrier` to verify whether a key is pressed and released; - Use `CountDownLatch` for frame activation; - Ensure thread-safety for keeping thrown exceptions. Other changes: - Made `FunctionKeyTeste

Re: RFR: 8339834: Replace usages of -mx and -ms in some tests [v3]

2024-09-11 Thread Alexey Ivanov
On Wed, 11 Sep 2024 09:19:21 GMT, Jaikiran Pai wrote: >> Can I please get a review of this trivial change which replaces the usages >> of `-mx` and `-ms` to `-Xmx` and `-Xms` in tests and in one code comment? >> >> As noted in https://bugs.openjdk.org/browse/JDK-8339834, these options are >> o

Re: RFR: 8339834: Replace usages of -mx and -ms in some tests [v2]

2024-09-11 Thread Alexey Ivanov
On Tue, 10 Sep 2024 11:10:38 GMT, Jaikiran Pai wrote: >> Can I please get a review of this trivial change which replaces the usages >> of `-mx` and `-ms` to `-Xmx` and `-Xms` in tests and in one code comment? >> >> As noted in https://bugs.openjdk.org/browse/JDK-8339834, these options are >> o

Re: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v3]

2024-09-11 Thread Alexey Ivanov
On Tue, 10 Sep 2024 16:47:34 GMT, Alexander Zvegintsev wrote: >> Sergey Bylokhov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update bug4490179.java > > test/jdk/javax/swing/JButton/bug4490179.java line 86: > >> 84: robo

Re: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v3]

2024-09-10 Thread Alexey Ivanov
On Tue, 10 Sep 2024 07:21:47 GMT, Sergey Bylokhov wrote: >> Several tests modified by https://github.com/openjdk/jdk/pull/19339 have >> been tweaked, see inline comments. >> >> Notes: >> * We have a few XXXRepaint.java tests and in this patch, I updated all of >> them to follow the change add

Re: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401

2024-09-09 Thread Alexey Ivanov
On Mon, 9 Sep 2024 06:27:26 GMT, Sergey Bylokhov wrote: >> Several tests modified by https://github.com/openjdk/jdk/pull/19339 have >> been tweaked, see inline comments. >> >> Notes: >> * We have a few XXXRepaint.java tests and in this patch, I updated all of >> them to follow the change adde

Re: RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401

2024-09-09 Thread Alexey Ivanov
On Wed, 4 Sep 2024 20:50:38 GMT, Sergey Bylokhov wrote: > Several tests modified by https://github.com/openjdk/jdk/pull/19339 have been > tweaked, see inline comments. > > Notes: > * We have a few XXXRepaint.java tests and in this patch, I updated all of > them to follow the change added to t

Re: RFR: 8326027: [TEST_BUG]Comparing buffered images of white background frame fails in Mac

2024-09-09 Thread Alexey Ivanov
On Tue, 3 Sep 2024 09:37:50 GMT, Tejesh R wrote: > > This is why I asked the question: does the comparison remain accurate > > without the need for tolerance if you use > > `Robot.createMultiResolutionScreenCapture` and use the highest resolution > > from the returned multi-resolution image? >

Integrated: 8332901: Select{Current, New}ItemTest.java for Choice don't open popup on macOS

2024-09-04 Thread Alexey Ivanov
On Thu, 15 Aug 2024 18:02:33 GMT, Alexey Ivanov wrote: > I looked at > `java/awt/Choice/SelectCurrentItemTest/SelectCurrentItemTest.java`, ran it > and noticed that the test does not open the popup of the `Choice` component > on macOS 14.x. > > If the popup does not open,

Re: RFR: 8332901: Select{Current,New}ItemTest.java for Choice don't open popup on macOS [v4]

2024-09-04 Thread Alexey Ivanov
On Tue, 20 Aug 2024 20:03:48 GMT, Alexey Ivanov wrote: > I found another test which tests the same scenario as `SelectNewItemTest`, > it's `test/jdk/java/awt/event/ComponentEvent/ComponentItemEventTest.java`. It > was added in #11786. I'm going to submit a bug to remove

Re: RFR: 8333403: Write a test to check various components events are triggered properly [v7]

2024-09-04 Thread Alexey Ivanov
On Mon, 5 Aug 2024 04:46:47 GMT, Ravi Gupta wrote: >> This testcase checks for the following assertions for Component events: >> >> 1. When components are resized, moved, hidden and shown the respective >> events are triggered. >> 2. When the components are hidden/disabled also,the component ev

Re: RFR: 8333403: Write a test to check various components events are triggered properly [v7]

2024-09-04 Thread Alexey Ivanov
On Wed, 4 Sep 2024 15:20:46 GMT, Alexey Ivanov wrote: >> Ravi Gupta has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8333403: Review comments fixed > > test/jdk/java/awt/event/ComponentEvent/ComponentEven

Re: RFR: 8333403: Write a test to check various components events are triggered properly [v6]

2024-09-04 Thread Alexey Ivanov
On Mon, 5 Aug 2024 11:52:45 GMT, Ravi Gupta wrote: > when form Frame.ICONIFIED to Frame.NORMAL componentMoved and componentResized > events are triggered Then verify that these events are triggered: -if (componentShown || componentHidden) { +if (componentShown || componentHidd

Re: RFR: 8333403: Write a test to check various components events are triggered properly [v6]

2024-09-04 Thread Alexey Ivanov
On Wed, 24 Jul 2024 19:23:01 GMT, Alexey Ivanov wrote: >> Ravi Gupta has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8333403: Review commnets fixed > > test/jdk/java/awt/event/ComponentEvent/ComponentEven

Re: RFR: 8326027: Comparing buffered images of white background frame fails in Mac

2024-09-02 Thread Alexey Ivanov
On Thu, 29 Aug 2024 04:38:29 GMT, Tejesh R wrote: > On analysis of captured image, it is observed that there are few pixels which > vary slightly w.r.t to expected color. Hence tolerance is included in color > comparison. > Tested in mach5 multiple time and its green. > JBS - [JDK-8187759](ht

Re: RFR: 8326027: Comparing buffered images of white background frame fails in Mac

2024-09-02 Thread Alexey Ivanov
On Mon, 2 Sep 2024 05:03:25 GMT, Jayathirth D V wrote: >>> Why are we extending this test to be run on Mac now? Looks like it was >>> Linux specific test. >>> >>> Also Title "Comparing buffered images of white background frame fails in >>> Mac" makes it looks like some product issue. But chang

Re: RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed [v2]

2024-08-30 Thread Alexey Ivanov
On Fri, 30 Aug 2024 04:57:56 GMT, Abhishek Kumar wrote: >> `static final Map ICONS_MAP` is modified only in >> `static` block. Then >> [com.sun.java.swing.plaf.gtk.GTKStyle#get](https://github.com/kumarabhi006/jdk/blob/73f7a5f15dbba54a98f3916ff1190520ac07874d/src/java.desktop/share/classes/com/

Re: RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed [v2]

2024-08-30 Thread Alexey Ivanov
On Thu, 29 Aug 2024 12:42:49 GMT, Alexey Ivanov wrote: >>> > One slight concern is that, does GTKStockIcon has any role to play with >>> > synchronized block? >>> >>> Sorry, I didn't understand what do you mean. >> >> I meant, since `

Re: RFR: 8326027: Comparing buffered images of white background frame fails in Mac

2024-08-30 Thread Alexey Ivanov
On Fri, 30 Aug 2024 04:59:58 GMT, Tejesh R wrote: > > Have you checked what is the root cause? Are the pixels drawn incorrectly > > in the frame, or is the robot distorting the colors when it grabs the > > pixels? > > The issue occurs intermittently/might be even host specific. It occurs when

Re: RFR: 8326027: Comparing buffered images of white background frame fails in Mac

2024-08-29 Thread Alexey Ivanov
On Thu, 29 Aug 2024 04:38:29 GMT, Tejesh R wrote: > On analysis of captured image, it is observed that there are few pixels which > vary slightly w.r.t to expected color. Hence tolerance is included in color > comparison. > Tested in mach5 multiple time and its green. I wonder whether the tol

Re: RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed

2024-08-29 Thread Alexey Ivanov
On Wed, 28 Aug 2024 08:54:39 GMT, Abhishek Kumar wrote: > `static final Map ICONS_MAP` is modified only in > `static` block. Then > [com.sun.java.swing.plaf.gtk.GTKStyle#get](https://github.com/kumarabhi006/jdk/blob/73f7a5f15dbba54a98f3916ff1190520ac07874d/src/java.desktop/share/classes/com/sun

Re: RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed

2024-08-29 Thread Alexey Ivanov
On Thu, 29 Aug 2024 05:20:20 GMT, Tejesh R wrote: > > > One slight concern is that, does GTKStockIcon has any role to play with > > > synchronized block? > > > > > > Sorry, I didn't understand what do you mean. > > I meant, since `ICONS_MAP` stores `GTKStockIcon` as value, I was wondering >

Re: RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed

2024-08-29 Thread Alexey Ivanov
On Thu, 29 Aug 2024 04:09:18 GMT, Abhishek Kumar wrote: > > What's the benefit of removing synchronized from the get call? > > As I mentioned earlier, `ICONS_MAP` are initialized only in **static block** > and after that it is just referenced to access the value out of it. Even > though `ICONS

Re: RFR: 8337851: Some tests have name which confuse jtreg [v3]

2024-08-27 Thread Alexey Ivanov
On Fri, 23 Aug 2024 22:14:12 GMT, Jonathan Gibbons wrote: > With my official `jtreg` hat on, I recommend always placing the `jtreg` tags > immediately after any legal header comments and _before_ any and all of the > source code that comprises the test. @jonathan-gibbons Are there any disadvan

Re: RFR: 8338668: Test javax/swing/JFileChooser/8080628/bug8080628.java doesn't test for GTK L&F [v2]

2024-08-23 Thread Alexey Ivanov
On Fri, 23 Aug 2024 09:21:02 GMT, Abhishek Kumar wrote: >> test/jdk/javax/swing/JFileChooser/8080628/bug8080628.java line 1: >> >>> 1: /* >> >> Could you also clean up the main method and remove the extra overhead in the >> SwingUtilities.invokeAndWait call? Also remember to update copyright y

<    1   2   3   4   5   6   7   8   9   10   >