Skip to content

Commit

Permalink
8314906: [testbug] Create behavior tests for text input controls
Browse files Browse the repository at this point in the history
Reviewed-by: aghaisas, kpk
  • Loading branch information
Andy Goryachev committed Oct 13, 2023
1 parent 4604e87 commit f76437d
Show file tree
Hide file tree
Showing 14 changed files with 2,738 additions and 16 deletions.
74 changes: 74 additions & 0 deletions doc-files/behavior/PasswordField.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# PasswordField Behavior

## Key Bindings

|Key Combination|Platform|Function|
|---------------|--------|--------|
|ctrl-BACK_SLASH|linux, win|deselect|
|BACKSPACE| |delete previous char|
|alt-BACKSPACE|mac|**disabled for security reasons**|
|ctrl-BACKSPACE|linux, win|**disabled for security reasons**|
|shift-BACKSPACE| |delete previous char|
|shortcut-BACKSPACE|mac|delete from line start|
|COPY| |copy|
|CUT| |cut|
|DELETE| |delete next char|
|alt-DELETE|mac|**disabled for security reasons**|
|ctrl-DELETE|linux, win|**disabled for security reasons**|
|ctrl-shift-DIGIT9| |toggle the virtual keyboard (if supported)|
|DOWN| |move to document end|
|shift-DOWN| |select to document end|
|END| |move to document end|
|shift-END|mac|extend selection to document end|
|shift-END|linux, win|select document end|
|shift-shortcut-END| |select to document end|
|shortcut-END| |move to document end|
|ENTER| |fire event|
|ESCAPE| |cancel edit (forwarded to the parent container)|
|HOME| |move to document start|
|shift-HOME|mac|extend selection to document start|
|shift-HOME|linux, win|select to document start|
|shift-shortcut-HOME| |select to document start|
|shortcut-HOME| |move to document start|
|shift-INSERT| |paste|
|shortcut-INSERT| |copy|
|LEFT| |previous character|
|alt-LEFT| |**disabled for security reasons**|
|alt-shift-LEFT|mac|**disabled for security reasons**|
|ctrl-LEFT|linux, win|**disabled for security reasons**|
|ctrl-shift-LEFT|linux, win|**disabled for security reasons**|
|shift-LEFT| |select left|
|shift-shortcut-LEFT|mac|select to document start|
|shortcut-LEFT|mac|move to document start|
|PASTE| |paste|
|RIGHT| |next character|
|alt-RIGHT|mac|**disabled for security reasons**|
|alt-shift-RIGHT|mac|**disabled for security reasons**|
|ctrl-RIGHT|linux, win|**disabled for security reasons**|
|ctrl-shift-RIGHT|linux, win|**disabled for security reasons**|
|shift-RIGHT| |select right|
|shift-shortcut-RIGHT|mac|select to document end|
|shortcut-RIGHT|mac|move to document end|
|TAB| |focus next|
|ctrl-TAB| |focus next|
|ctrl-shift-TAB| |focus previous|
|shift-TAB| |focus previous|
|UP| |move to document start|
|shift-UP| |select to document start|
| | |  |
|shortcut-A| |select all|
|shortcut-C| |copy|
|ctrl-H|linux, win|delete previous char|
|shortcut-V| |paste|
|shortcut-X| |cut|
|ctrl-Y|win|redo|
|ctrl-shift-Z|linux|redo|
|shift-shortcut-Z|mac|redo|
|shortcut-Z| |undo|


Notes:

1. Base class mappings modified by the PasswordField class are highlighted in bold.
2. On Mac, alt is represented by the Option key.
3. On Mac, shortcut is represented by the Command key.
88 changes: 88 additions & 0 deletions doc-files/behavior/TextArea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# TextArea Behavior

## Key Bindings

|Key Combination|Platform|Function|
|---------------|--------|--------|
|ctrl-BACK_SLASH|linux, win|deselect|
|BACKSPACE| |delete previous char|
|alt-BACKSPACE|mac|delete previous word|
|ctrl-BACKSPACE|linux, win|delete previous word|
|shift-BACKSPACE| |delete previous char|
|shortcut-BACKSPACE|mac|delete from line start|
|COPY| |copy|
|CUT| |cut|
|DELETE| |delete next char|
|alt-DELETE|mac|delete next word|
|ctrl-DELETE|linux, win|delete next word|
|ctrl-shift-DIGIT9| |toggle the virtual keyboard (if supported)|
|DOWN| |**line down**|
|alt-DOWN|mac|**paragraph down**|
|alt-shift-DOWN|mac|**select paragraph down**|
|ctrl-DOWN|linux, win|**paragraph down**|
|ctrl-shift-DOWN|linux, win|**select paragraph down**|
|shift-DOWN| |**select line down**|
|shift-shortcut-DOWN|mac|**extend selection to document end**|
|shortcut-DOWN| |**move to document end**|
|END| |**line end**|
|shift-END| |**select to line end**|
|shortcut-END| |move to document end|
|shortcut-shift-END| |select to document end|
|ENTER| |**insert new line**|
|ESCAPE| |cancel edit (forwarded to the parent container)|
|HOME| |**line start**|
|shift-HOME| |**select to line start**|
|shift-shortcut-HOME| |select to document start|
|shortcut-HOME| |move to document start|
|shift-INSERT| |paste|
|shortcut-INSERT| |copy|
|LEFT| |previous character|
|alt-LEFT| |left word|
|alt-shift-LEFT|mac|select left word|
|ctrl-LEFT|linux, win|left word|
|ctrl-shift-LEFT|linux, win|select left word|
|shift-LEFT| |select left|
|shift-shortcut-LEFT|mac|**select to line start**|
|shortcut-LEFT|mac|**move to line start**|
|PAGE_DOWN| |**page down**|
|shift-PAGE_DOWN| |**select page down**|
|PAGE_UP| |**page up**|
|shift-PAGE_UP| |**select page up**|
|PASTE| |paste|
|RIGHT| |next character|
|alt-RIGHT|mac|right word|
|alt-shift-RIGHT|mac|select right word|
|ctrl-RIGHT|linux, win|right word|
|ctrl-shift-RIGHT|linux, win|select right word|
|shift-RIGHT| |select right|
|shift-shortcut-RIGHT|mac|**select to line end**|
|shortcut-RIGHT|mac|**move to line end**|
|TAB| |**insert tab**|
|ctrl-TAB| |focus next|
|ctrl-shift-TAB| |focus previous|
|shift-TAB| |focus previous|
|UP| |**line up**|
|alt-UP|mac|**paragraph up**|
|alt-shift-UP|mac|**select paragraph up**|
|ctrl-UP|linux, win|**paragraph up**|
|ctrl-shift-UP|linux, win|**select paragraph up**|
|shift-UP| |**select line up**|
|shift-shortcut-UP|mac|**extend selection to document start**|
|shortcut-UP|mac|**move to document start**|
| | |  |
|shortcut-A| |select all|
|shortcut-C| |copy|
|ctrl-H|linux, win|delete previous char|
|shortcut-V| |paste|
|shortcut-X| |cut|
|ctrl-Y|win|redo|
|ctrl-shift-Z|linux|redo|
|shift-shortcut-Z|mac|redo|
|shortcut-Z| |undo|


Notes:

1. Base class mappings modified by the TextArea class are highlighted in bold.
2. On Mac, alt is represented by the Option key.
3. On Mac, shortcut is represented by the Command key.
74 changes: 74 additions & 0 deletions doc-files/behavior/TextField.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# TextField Behavior

## Key Bindings

|Key Combination|Platform|Function|
|---------------|--------|--------|
|ctrl-BACK_SLASH|linux, win|deselect|
|BACKSPACE| |delete previous char|
|alt-BACKSPACE|mac|delete previous word|
|ctrl-BACKSPACE|linux, win|delete previous word|
|shift-BACKSPACE| |delete previous char|
|shortcut-BACKSPACE|mac|delete from line start|
|COPY| |copy|
|CUT| |cut|
|DELETE| |delete next char|
|alt-DELETE|mac|delete next word|
|ctrl-DELETE|linux, win|delete next word|
|ctrl-shift-DIGIT9| |toggle the virtual keyboard (if supported)|
|DOWN| |move to document end|
|shift-DOWN| |select to document end|
|END| |move to document end|
|shift-END|mac|extend selection to document end|
|shift-END|linux, win|select document end|
|shift-shortcut-END| |select to document end|
|shortcut-END| |move to document end|
|ENTER| |fire event|
|ESCAPE| |cancel edit (forwarded to the parent container)|
|HOME| |move to document start|
|shift-HOME|mac|extend selection to document start|
|shift-HOME|linux, win|select to document start|
|shift-shortcut-HOME| |select to document start|
|shortcut-HOME| |move to document start|
|shift-INSERT| |paste|
|shortcut-INSERT| |copy|
|LEFT| |previous character|
|alt-LEFT| |left word|
|alt-shift-LEFT|mac|select left word|
|ctrl-LEFT|linux, win|left word|
|ctrl-shift-LEFT|linux, win|select left word|
|shift-LEFT| |select left|
|shift-shortcut-LEFT|mac|select to document start|
|shortcut-LEFT|mac|move to document start|
|PASTE| |paste|
|RIGHT| |next character|
|alt-RIGHT|mac|right word|
|alt-shift-RIGHT|mac|select right word|
|ctrl-RIGHT|linux, win|right word|
|ctrl-shift-RIGHT|linux, win|select right word|
|shift-RIGHT| |select right|
|shift-shortcut-RIGHT|mac|select to document end|
|shortcut-RIGHT|mac|move to document end|
|TAB| |focus next|
|ctrl-TAB| |focus next|
|ctrl-shift-TAB| |focus previous|
|shift-TAB| |focus previous|
|UP| |move to document start|
|shift-UP| |select to document start|
| | |  |
|shortcut-A| |select all|
|shortcut-C| |copy|
|ctrl-H|linux, win|delete previous char|
|shortcut-V| |paste|
|shortcut-X| |cut|
|ctrl-Y|win|redo|
|ctrl-shift-Z|linux|redo|
|shift-shortcut-Z|mac|redo|
|shortcut-Z| |undo|


Notes:

1. Base class mappings modified by the TextField class are highlighted in bold.
2. On Mac, alt is represented by the Option key.
3. On Mac, shortcut is represented by the Command key.
73 changes: 73 additions & 0 deletions doc-files/behavior/TextInputControl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# TextInputControl Behavior

## Key Bindings

|Key Combination|Platform|Function|
|---------------|--------|--------|
|ctrl-BACK_SLASH|linux, win|deselect|
|BACKSPACE| |delete previous char|
|alt-BACKSPACE|mac|delete previous word|
|ctrl-BACKSPACE|linux, win|delete previous word|
|shift-BACKSPACE| |delete previous char|
|shortcut-BACKSPACE|mac|delete from line start|
|COPY| |copy|
|CUT| |cut|
|DELETE| |delete next char|
|alt-DELETE|mac|delete next word|
|ctrl-DELETE|linux, win|delete next word|
|ctrl-shift-DIGIT9| |toggle the virtual keyboard (if supported)|
|DOWN| |move to document end|
|shift-DOWN| |select to document end|
|END| |move to document end|
|shift-END|mac|extend selection to document end|
|shift-END|linux, win|select document end|
|shift-shortcut-END| |select to document end|
|shortcut-END| |move to document end|
|ENTER| |fire (no-op)|
|ESCAPE| |cancel edit (forwarded to the parent container)|
|HOME| |move to document start|
|shift-HOME|mac|extend selection to document start|
|shift-HOME|linux, win|select to document start|
|shift-shortcut-HOME| |select to document start|
|shortcut-HOME| |move to document start|
|shift-INSERT| |paste|
|shortcut-INSERT| |copy|
|LEFT| |previous character|
|alt-LEFT| |left word|
|alt-shift-LEFT|mac|select left word|
|ctrl-LEFT|linux, win|left word|
|ctrl-shift-LEFT|linux, win|select left word|
|shift-LEFT| |select left|
|shift-shortcut-LEFT|mac|select to document start|
|shortcut-LEFT|mac|move to document start|
|PASTE| |paste|
|RIGHT| |next character|
|alt-RIGHT|mac|right word|
|alt-shift-RIGHT|mac|select right word|
|ctrl-RIGHT|linux, win|right word|
|ctrl-shift-RIGHT|linux, win|select right word|
|shift-RIGHT| |select right|
|shift-shortcut-RIGHT|mac|select to document end|
|shortcut-RIGHT|mac|move to document end|
|TAB| |focus next|
|ctrl-TAB| |focus next|
|ctrl-shift-TAB| |focus previous|
|shift-TAB| |focus previous|
|UP| |move to document start|
|shift-UP| |select to document start|
| | |  |
|shortcut-A| |select all|
|shortcut-C| |copy|
|ctrl-H|linux, win|delete previous char|
|shortcut-V| |paste|
|shortcut-X| |cut|
|ctrl-Y|win|redo|
|ctrl-shift-Z|linux|redo|
|shift-shortcut-Z|mac|redo|
|shortcut-Z| |undo|


Notes:

1. On Mac, alt is represented by the Option key.
2. On Mac, shortcut is represented by the Command key.

1 comment on commit f76437d

@openjdk-notifier
Copy link

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.