tests: Add tab_ordering_custom_i32_vs_u32 test

This test verifies the behavior of i32/u32 discrepancy
in tabIndex in AVM1.
This commit is contained in:
Kamil Jarosz 2024-04-19 12:08:18 +02:00 committed by Nathan Adams
parent 02091e590d
commit 40bc787fd7
5 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[
{ "type": "KeyDown", "key_code": 9 },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "KeyDown", "key_code": 9 },
{ "type": "KeyDown", "key_code": 9 }
]

View File

@ -0,0 +1,12 @@
Focus changed
old: null
new: _level0.text
Focus changed
old: _level0.text
new: _level0.text2
Focus changed
old: _level0.text2
new: _level0.button
Focus changed
old: _level0.button
new: _level0.text

View File

@ -0,0 +1,18 @@
var counter = 0;
var listener = new Object();
listener.onSetFocus = function(oldFocus, newFocus) {
++counter;
if (counter > 4) {
return;
}
if (newFocus) {
trace("Focus changed");
trace(" old: " + oldFocus);
trace(" new: " + newFocus);
}
};
Selection.addListener(listener);
text.tabIndex = 4294967293;
text2.tabIndex = -2;
button.tabIndex = 0;

Binary file not shown.

View File

@ -0,0 +1 @@
num_ticks = 1