-
-
Notifications
You must be signed in to change notification settings - Fork 832
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add avm1/tab_ordering_custom_m1
This test verifies the behavior of tabIndex = -1.
- Loading branch information
1 parent
8f288b5
commit e898696
Showing
5 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
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,10 @@ | ||
[ | ||
{ "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 }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "KeyDown", "key_code": 9 }, | ||
{ "type": "KeyDown", "key_code": 9 } | ||
] |
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 @@ | ||
Tab pressed | ||
Focus changed | ||
old: null | ||
new: _level0.text6 | ||
Tab pressed | ||
Focus changed | ||
old: _level0.text6 | ||
new: _level0.text5 | ||
Tab pressed | ||
Focus changed | ||
old: _level0.text5 | ||
new: _level0.text2 | ||
Tab pressed | ||
Focus changed | ||
old: _level0.text2 | ||
new: _level0.text1 | ||
Tab pressed | ||
Focus changed | ||
old: _level0.text1 | ||
new: _level0.text4 | ||
Tab pressed | ||
Focus changed | ||
old: _level0.text4 | ||
new: _level0.text6 | ||
Tab pressed | ||
Focus changed | ||
old: _level0.text6 | ||
new: _level0.text5 | ||
Tab pressed |
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,32 @@ | ||
var stopTrace = false; | ||
var tracedCount = 0; | ||
|
||
var listener = new Object(); | ||
listener.onSetFocus = function(oldFocus, newFocus) { | ||
if (newFocus && !stopTrace) { | ||
trace("Focus changed"); | ||
trace(" old: " + oldFocus); | ||
trace(" new: " + newFocus); | ||
} | ||
}; | ||
Selection.addListener(listener); | ||
|
||
var listener = new Object(); | ||
listener.onKeyDown = function() { | ||
if (Key.getCode() == 9 && !stopTrace) { | ||
++tracedCount; | ||
if (tracedCount == 9) { | ||
stopTrace = true; | ||
} else { | ||
trace("Tab pressed"); | ||
} | ||
} | ||
}; | ||
Key.addListener(listener); | ||
|
||
text1.tabIndex = 1; | ||
text2.tabIndex = 0; | ||
text3.tabIndex = -1; | ||
text4.tabIndex = 2; | ||
text5.tabIndex = -2; | ||
text6.tabIndex = -3; |
Binary file not shown.
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 @@ | ||
num_ticks = 1 |