-
-
Notifications
You must be signed in to change notification settings - Fork 765
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add focus_highlight/focus_highlight_basic
- Loading branch information
Showing
14 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
tests/tests/swfs/visual/focus_highlight/focus_highlight_basic/input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[ | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "Wait" }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "Wait" }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "MouseMove", "pos": [42, 42] }, | ||
{ "type": "Wait" }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "MouseDown", "pos": [42, 42], "btn": "Left" }, | ||
{ "type": "Wait" }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "MouseUp", "pos": [42, 42], "btn": "Left" }, | ||
{ "type": "Wait" }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "KeyDown", "key_code": 97 }, | ||
{ "type": "Wait" }, | ||
{ "type": "KeyDown", "key_code": 27 }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "KeyDown", "key_code": 27 }, | ||
{ "type": "Wait" }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "KeyDown", "key_code": 27 }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "Wait" }, | ||
{ "type": "MouseMove", "pos": [42, 42] }, | ||
{ "type": "KeyDown", "key_code": 27 }, | ||
{ "type": "Wait" } | ||
] |
Binary file added
BIN
+1.56 KB
...al/focus_highlight/focus_highlight_basic/output.01_highlight_under.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.54 KB
...ual/focus_highlight/focus_highlight_basic/output.02_highlight_over.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.52 KB
...l/focus_highlight/focus_highlight_basic/output.03_after_mouse_move.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.52 KB
...ual/focus_highlight/focus_highlight_basic/output.04_after_mouse_up.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.52 KB
...l/focus_highlight/focus_highlight_basic/output.05_after_mouse_down.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.54 KB
...ual/focus_highlight/focus_highlight_basic/output.06_after_key_down.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.56 KB
...focus_highlight/focus_highlight_basic/output.07_after_focus_change.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.54 KB
...ghlight/focus_highlight_basic/output.08_after_focus_change_and_tab.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.56 KB
...cus_highlight_basic/output.09_after_focus_change_without_highlight.expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
15 changes: 15 additions & 0 deletions
15
tests/tests/swfs/visual/focus_highlight/focus_highlight_basic/test.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
clip.tabEnabled = true; | ||
clip.focusEnabled = true; | ||
clip.tabIndex = 1; | ||
clip2.tabEnabled = true; | ||
clip2.focusEnabled = true; | ||
clip2.tabIndex = 2; | ||
|
||
var listener = new Object(); | ||
listener.onKeyDown = function() { | ||
if (Key.getCode() == 27) { | ||
Selection.setFocus(clip2); | ||
Selection.setFocus(clip); | ||
} | ||
}; | ||
Key.addListener(listener); |
Binary file added
BIN
+369 Bytes
tests/tests/swfs/visual/focus_highlight/focus_highlight_basic/test.swf
Binary file not shown.
40 changes: 40 additions & 0 deletions
40
tests/tests/swfs/visual/focus_highlight/focus_highlight_basic/test.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
num_ticks = 9 | ||
|
||
[image_comparisons."output.01_highlight_under"] | ||
tolerance = 0 | ||
trigger = 1 | ||
|
||
[image_comparisons."output.02_highlight_over"] | ||
tolerance = 0 | ||
trigger = 2 | ||
|
||
[image_comparisons."output.03_after_mouse_move"] | ||
tolerance = 0 | ||
trigger = 3 | ||
|
||
[image_comparisons."output.04_after_mouse_up"] | ||
tolerance = 0 | ||
trigger = 4 | ||
|
||
[image_comparisons."output.05_after_mouse_down"] | ||
tolerance = 0 | ||
trigger = 5 | ||
|
||
[image_comparisons."output.06_after_key_down"] | ||
tolerance = 0 | ||
trigger = 6 | ||
|
||
[image_comparisons."output.07_after_focus_change"] | ||
tolerance = 0 | ||
trigger = 7 | ||
|
||
[image_comparisons."output.08_after_focus_change_and_tab"] | ||
tolerance = 0 | ||
trigger = 8 | ||
|
||
[image_comparisons."output.09_after_focus_change_without_highlight"] | ||
tolerance = 0 | ||
trigger = 9 | ||
|
||
[player_options] | ||
with_renderer = { optional = false, sample_count = 1 } |