Use "_self" as a default target for getURL when no target is given. Fixes bug #32425
[gnash.git] / testsuite / actionscript.all / Video.as
blob1d0533412575349bf80442aa2c5fbd7426509631
1 //
2 // Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software
3 // Foundation, Inc
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 // Test case for Video ActionScript class
21 // compile this test case with Ming makeswf, and then
22 // execute it like this gnash -1 -r 0 -v out.swf
25 rcsid="$Id: Video.as,v 1.16 2008/03/29 22:50:54 strk Exp $";
26 #include "check.as"
28 #if OUTPUT_VERSION < 6
30 check_equals(Video, undefined);
31 check_totals(1);
33 #else
35 check(Video.prototype.hasOwnProperty("attachVideo"));
36 check(Video.prototype.hasOwnProperty("clear"));
37 check(!Video.prototype.hasOwnProperty("smoothing"));
38 check(!Video.prototype.hasOwnProperty("deblocking"));
39 check(!Video.prototype.hasOwnProperty("_alpha"));
40 check(!Video.prototype.hasOwnProperty("_height"));
41 check(!Video.prototype.hasOwnProperty("height"));
42 check(!Video.prototype.hasOwnProperty("_name"));
43 check(!Video.prototype.hasOwnProperty("_parent"));
44 check(!Video.prototype.hasOwnProperty("_rotation"));
45 check(!Video.prototype.hasOwnProperty("_visible"));
46 check(!Video.prototype.hasOwnProperty("_width"));
47 check(!Video.prototype.hasOwnProperty("width"));
48 check(!Video.prototype.hasOwnProperty("_x"));
49 check(!Video.prototype.hasOwnProperty("_xmouse"));
50 check(!Video.prototype.hasOwnProperty("_xscale"));
51 check(!Video.prototype.hasOwnProperty("_y"));
52 check(!Video.prototype.hasOwnProperty("_ymouse"));
53 check(!Video.prototype.hasOwnProperty("_yscale"));
54 check(!Video.prototype.hasOwnProperty("_xmouse"));
56 // test Video class an interface availability
57 check_equals(typeof(Video), 'function');
58 check_equals(typeof(Video.prototype), 'object');
59 check_equals(typeof(Video.prototype.__proto__), 'object');
60 check_equals(Video.prototype.__proto__, Object.prototype);
61 check_equals(typeof(Video.prototype.attachVideo), 'function');
62 check_equals(typeof(Video.prototype.clear), 'function');
64 // test Video instance
65 var videoObj = new Video;
66 check_equals (typeof(videoObj), 'object');
67 check_equals (typeof(videoObj.attachVideo), 'function');
68 check_equals (typeof(videoObj.clear), 'function');
69 check_equals (typeof(videoObj._x), 'undefined');
70 check_equals (typeof(videoObj._y), 'undefined');
71 check_equals (typeof(videoObj._width), 'undefined');
72 check_equals (typeof(videoObj._height), 'undefined');
73 check_equals (typeof(videoObj._xscale), 'undefined');
74 check_equals (typeof(videoObj._yscale), 'undefined');
75 check_equals (typeof(videoObj._xmouse), 'undefined');
76 check_equals (typeof(videoObj._ymouse), 'undefined');
77 check_equals (typeof(videoObj._alpha), 'undefined');
78 check_equals (typeof(videoObj._rotation), 'undefined');
79 check_equals (typeof(videoObj._target), 'undefined');
80 check_equals (typeof(videoObj._parent), 'undefined');
82 nc = new NetConnection();
83 nc.connect(null);
84 ns = new NetStream(nc);
85 videoObj.attachVideo(ns);
86 ns.play(MEDIA(square.flv));
88 check(!videoObj.hasOwnProperty("attachVideo"));
89 check(!videoObj.hasOwnProperty("smoothing"));
90 check(!videoObj.hasOwnProperty("deblocking"));
91 check(!videoObj.hasOwnProperty("clear"));
92 check(!videoObj.hasOwnProperty("_alpha"));
93 check(!videoObj.hasOwnProperty("_height"));
94 check(!videoObj.hasOwnProperty("height"));
95 check(!videoObj.hasOwnProperty("_name"));
96 check(!videoObj.hasOwnProperty("_parent"));
97 check(!videoObj.hasOwnProperty("_rotation"));
98 check(!videoObj.hasOwnProperty("_visible"));
99 check(!videoObj.hasOwnProperty("_width"));
100 check(!videoObj.hasOwnProperty("width"));
101 check(!videoObj.hasOwnProperty("_x"));
102 check(!videoObj.hasOwnProperty("_xmouse"));
103 check(!videoObj.hasOwnProperty("_xscale"));
104 check(!videoObj.hasOwnProperty("_y"));
105 check(!videoObj.hasOwnProperty("_ymouse"));
106 check(!videoObj.hasOwnProperty("_yscale"));
107 check(!videoObj.hasOwnProperty("_xmouse"));
109 check(!Video.prototype.hasOwnProperty("smoothing"));
110 check(!Video.prototype.hasOwnProperty("deblocking"));
111 check(!Video.prototype.hasOwnProperty("_alpha"));
112 check(!Video.prototype.hasOwnProperty("_height"));
113 check(!Video.prototype.hasOwnProperty("height"));
114 check(!Video.prototype.hasOwnProperty("_name"));
115 check(!Video.prototype.hasOwnProperty("_parent"));
116 check(!Video.prototype.hasOwnProperty("_rotation"));
117 check(!Video.prototype.hasOwnProperty("_visible"));
118 check(!Video.prototype.hasOwnProperty("_width"));
119 check(!Video.prototype.hasOwnProperty("width"));
120 check(!Video.prototype.hasOwnProperty("_x"));
121 check(!Video.prototype.hasOwnProperty("_xmouse"));
122 check(!Video.prototype.hasOwnProperty("_xscale"));
123 check(!Video.prototype.hasOwnProperty("_y"));
124 check(!Video.prototype.hasOwnProperty("_ymouse"));
125 check(!Video.prototype.hasOwnProperty("_yscale"));
126 check(!Video.prototype.hasOwnProperty("_xmouse"));
128 check_totals(79);
130 #endif