Some more tests (minor)
[gnash.git] / testsuite / misc-swfc.all / button_test2.sc
blob0b10dc8c7797add970950339f898b2e496413156
1 /*
2  *   Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
3  * 
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16  *
17  */ 
20  * This is a testcase for bug https://savannah.gnu.org/bugs/index.php?22982.
21  * To trigger the bug:
22  *   1) Make sure GC::collect() always run (don't wait for a threshold of newly allocated GcResources)
23  *   2) Run, a red rectangle would appear and disappear every second
24  *   3) Move the mouse on the rectangle while it's visible and wait for it to become invisible
25  *   4) Move the mouse off the rectangle while it's not visible
26  *   5) Wait for the rectangle to appear again and then disappear
27  *   6) Segfault should be triggered when the button disappears
28  *
29  *
30  */
33 .flash  bbox=800x600 filename="button_test2.swf" background=white version=6 fps=1
35 .frame 1
37     .action:
38 #include "Dejagnu.sc"
39     .end
41 .box rbox width=200 height=300 fill=#FF0000 color=#000000
43 .sprite buttonChild
44         .put rbox
45 .end
47 .button button1
48     .show buttonChild as=idle
49     .show rbox        as=area
50     .show rbox        as=hover
51 .end
53 .sprite buttonContainer
54     .frame 2
55     .put button1 pin=center x=100 y=100 scalex=100% scaley=100% alpha=100%
56 .end
58 .put buttonContainer 
60 .end  // file end