tests: Add avm1/focus_root_movie test
This test verifies the behavior of focusing and tabbing into the root movie.
This commit is contained in:
parent
d39c7339d9
commit
b0eb0ef1d9
|
@ -0,0 +1,7 @@
|
||||||
|
[
|
||||||
|
{ "type": "KeyDown", "key_code": 9 },
|
||||||
|
{ "type": "KeyDown", "key_code": 9 },
|
||||||
|
{ "type": "KeyDown", "key_code": 9 },
|
||||||
|
{ "type": "KeyDown", "key_code": 27 },
|
||||||
|
{ "type": "KeyDown", "key_code": 9 }
|
||||||
|
]
|
|
@ -0,0 +1,2 @@
|
||||||
|
Focus changed: null -> _level0.clip
|
||||||
|
=====
|
|
@ -0,0 +1,25 @@
|
||||||
|
_root.focusEnabled = true;
|
||||||
|
_root.tabEnabled = true;
|
||||||
|
_root.tabIndex = 1;
|
||||||
|
_root._focusrect = true;
|
||||||
|
|
||||||
|
_root.onRelease = function() {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
_root.clip.focusEnabled = true;
|
||||||
|
_root.clip.tabEnabled = true;
|
||||||
|
_root.clip.tabIndex = 1;
|
||||||
|
_root.clip._focusrect = true;
|
||||||
|
|
||||||
|
var listener = new Object();
|
||||||
|
listener.onSetFocus = function(oldFocus, newFocus) {
|
||||||
|
if (newFocus) {
|
||||||
|
trace("Focus changed: " + oldFocus + " -> " + newFocus);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Selection.addListener(listener);
|
||||||
|
|
||||||
|
Selection.setFocus(_root);
|
||||||
|
Selection.setFocus(_root.clip);
|
||||||
|
trace("=====");
|
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
num_ticks = 1
|
Loading…
Reference in New Issue