tests: Add focusrect_swf6 test
This test verifies the behavior of _focusrect for SWF6.
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
{ "type": "KeyDown", "key_code": 27 },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 27 },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 27 },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 27 },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 27 },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 27 },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" },
|
||||
{ "type": "KeyDown", "key_code": 9 },
|
||||
{ "type": "Wait" }
|
||||
]
|
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 172 B |
After Width: | Height: | Size: 172 B |
After Width: | Height: | Size: 172 B |
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 172 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 172 B |
After Width: | Height: | Size: 172 B |
|
@ -0,0 +1,42 @@
|
|||
Setting test stage to 1
|
||||
Focus changed
|
||||
old: null
|
||||
new: _level0.clip1
|
||||
Focus changed
|
||||
old: _level0.clip1
|
||||
new: _level0.clip2
|
||||
Setting test stage to 2
|
||||
Focus changed
|
||||
old: _level0.clip2
|
||||
new: _level0.clip1
|
||||
Focus changed
|
||||
old: _level0.clip1
|
||||
new: _level0.clip2
|
||||
Setting test stage to 3
|
||||
Focus changed
|
||||
old: _level0.clip2
|
||||
new: _level0.clip1
|
||||
Focus changed
|
||||
old: _level0.clip1
|
||||
new: _level0.clip2
|
||||
Setting test stage to 4
|
||||
Focus changed
|
||||
old: _level0.clip2
|
||||
new: _level0.clip1
|
||||
Focus changed
|
||||
old: _level0.clip1
|
||||
new: _level0.clip2
|
||||
Setting test stage to 5
|
||||
Focus changed
|
||||
old: _level0.clip2
|
||||
new: _level0.clip1
|
||||
Focus changed
|
||||
old: _level0.clip1
|
||||
new: _level0.clip2
|
||||
Setting test stage to 6
|
||||
Focus changed
|
||||
old: _level0.clip2
|
||||
new: _level0.clip1
|
||||
Focus changed
|
||||
old: _level0.clip1
|
||||
new: _level0.clip2
|
|
@ -0,0 +1,46 @@
|
|||
var listener = new Object();
|
||||
listener.onSetFocus = function(oldFocus, newFocus) {
|
||||
if (newFocus) {
|
||||
trace("Focus changed");
|
||||
trace(" old: " + oldFocus);
|
||||
trace(" new: " + newFocus);
|
||||
}
|
||||
};
|
||||
Selection.addListener(listener);
|
||||
|
||||
clip1.tabEnabled = true;
|
||||
clip1.tabIndex = 1;
|
||||
clip2.tabEnabled = true;
|
||||
clip2.tabIndex = 2;
|
||||
|
||||
var testStage = 0;
|
||||
function nextTestStage() {
|
||||
testStage += 1;
|
||||
trace("Setting test stage to " + testStage);
|
||||
if (testStage == 1) {
|
||||
_focusrect = true;
|
||||
} else if (testStage == 2) {
|
||||
_focusrect = false;
|
||||
} else if (testStage == 3) {
|
||||
_focusrect = true;
|
||||
clip1._focusrect = false;
|
||||
} else if (testStage == 4) {
|
||||
_focusrect = false;
|
||||
clip1._focusrect = true;
|
||||
} else if (testStage == 5) {
|
||||
_focusrect = true;
|
||||
clip1._focusrect = null;
|
||||
} else if (testStage == 6) {
|
||||
_focusrect = false;
|
||||
clip1._focusrect = null;
|
||||
}
|
||||
Selection.setFocus(clip2);
|
||||
}
|
||||
|
||||
var listener = new Object();
|
||||
listener.onKeyDown = function() {
|
||||
if (Key.getCode() == 27) {
|
||||
nextTestStage();
|
||||
}
|
||||
};
|
||||
Key.addListener(listener);
|
|
@ -0,0 +1,17 @@
|
|||
num_ticks = 12
|
||||
|
||||
image_comparisons."output.01a".trigger = 1
|
||||
image_comparisons."output.01b".trigger = 2
|
||||
image_comparisons."output.02a".trigger = 3
|
||||
image_comparisons."output.02b".trigger = 4
|
||||
image_comparisons."output.03a".trigger = 5
|
||||
image_comparisons."output.03b".trigger = 6
|
||||
image_comparisons."output.04a".trigger = 7
|
||||
image_comparisons."output.04b".trigger = 8
|
||||
image_comparisons."output.05a".trigger = 9
|
||||
image_comparisons."output.05b".trigger = 10
|
||||
image_comparisons."output.06a".trigger = 11
|
||||
image_comparisons."output.06b".trigger = 12
|
||||
|
||||
[player_options]
|
||||
with_renderer = { optional = false, sample_count = 1 }
|