Skip to content

Commit

Permalink
tests: Add focusrect_mouse_swf8 test
Browse files Browse the repository at this point in the history
This test verifies the behavior of focus highlight when
mouse is moved and mouse buttons are clicked for SWF8.
  • Loading branch information
kjarosh authored and Dinnerbone committed Apr 23, 2024
1 parent a594d8d commit 31d8d98
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/tests/swfs/avm1/focusrect_mouse_swf8/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{ "type": "KeyDown", "key_code": 9 },
{ "type": "Wait" },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "MouseMove", "pos": [5, 5] },
{ "type": "MouseMove", "pos": [6, 6] },
{ "type": "Wait" },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "MouseDown", "pos": [5, 5], "btn": "Left" },
{ "type": "Wait" },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "MouseUp", "pos": [5, 5], "btn": "Left" },
{ "type": "Wait" },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "MouseDown", "pos": [5, 5], "btn": "Right" },
{ "type": "Wait" },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "MouseUp", "pos": [5, 5], "btn": "Right" },
{ "type": "Wait" },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "MouseDown", "pos": [5, 5], "btn": "Middle" },
{ "type": "Wait" },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "MouseUp", "pos": [5, 5], "btn": "Middle" },
{ "type": "Wait" }
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Binary file added tests/tests/swfs/avm1/focusrect_mouse_swf8/test.swf
Binary file not shown.
13 changes: 13 additions & 0 deletions tests/tests/swfs/avm1/focusrect_mouse_swf8/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
num_ticks = 8

image_comparisons."output.01.tab".trigger = 1
image_comparisons."output.02.move".trigger = 2
image_comparisons."output.03.left_down".trigger = 3
image_comparisons."output.04.left_up".trigger = 4
image_comparisons."output.05.right_down".trigger = 5
image_comparisons."output.06.right_up".trigger = 6
image_comparisons."output.07.middle_down".trigger = 7
image_comparisons."output.08.middle_up".trigger = 8

[player_options]
with_renderer = { optional = false, sample_count = 1 }

0 comments on commit 31d8d98

Please sign in to comment.