~ubuntu-branches/ubuntu/karmic/gnash/karmic

« back to all changes in this revision

Viewing changes to testsuite/actionscript.all/LocalConnection.as

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2008-10-13 14:29:49 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20081013142949-f6qdvnu4mn05ltdc
Tags: 0.8.4~~bzr9980-0ubuntu1
* new upstream release 0.8.4 (LP: #240325)
* ship new lib usr/lib/gnash/libmozsdk.so.* in mozilla-plugin-gnash
  - update debian/mozilla-plugin-gnash.install
* ship new lib usr/lib/gnash/libgnashnet.so.* in gnash-common
  - update debian/gnash-common.install
* add basic debian/build_head script to build latest CVS head packages.
  - add debian/build_head
* new sound architecture requires build depend on libsdl1.2-dev
  - update debian/control
* head build script now has been completely migrated to bzr (upstream +
  ubuntu)
  - update debian/build_head
* disable kde gui until klash/qt4 has been fixed; keep kde packages as empty
  packages for now.
  - update debian/rules
  - debian/klash.install
  - debian/klash.links
  - debian/klash.manpages
  - debian/konqueror-plugin-gnash.install
* drop libkonq5-dev build dependency accordingly
  - update debian/control
* don't install headers manually anymore. gnash doesnt provide a -dev
  package after all
  - update debian/rules
* update libs installed in gnash-common; libgnashserver-*.so is not available
  anymore (removed); in turn we add the new libgnashcore-*.so
  - update debian/gnash-common.install
* use -Os for optimization and properly pass CXXFLAGS=$(CFLAGS) to configure
  - update debian/rules
* touch firefox .autoreg in postinst of mozilla plugin
  - update debian/mozilla-plugin-gnash.postinst
* link gnash in ubufox plugins directory for the plugin alternative switcher
  - add debian/mozilla-plugin-gnash.links
* suggest ubufox accordingly
  - update debian/control
* add new required build-depends on libgif-dev
  - update debian/control
* add Xb-Npp-Description and Xb-Npp-File as new plugin database meta data
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
// compile this test case with Ming makeswf, and then
21
21
// execute it like this gnash -1 -r 0 -v out.swf
22
22
 
23
 
rcsid="$Id: LocalConnection.as,v 1.18 2008/01/05 03:55:00 rsavoye Exp $";
24
 
 
 
23
 
 
24
// We need more than one frame to test the connection properly.
 
25
 
 
26
rcsid="$Id: LocalConnection.as,v 1.21 2008/05/05 15:26:38 bwy Exp $";
25
27
#include "check.as"
26
28
 
27
29
#if OUTPUT_VERSION < 6
28
30
 
29
31
check_equals(LocalConnection, undefined);
 
32
totals(1);
30
33
 
31
34
#else // OUTPUT_VERSION >= 6
32
35
 
33
 
var tmp = new LocalConnection;
 
36
xcheck (LocalConnection.prototype.hasOwnProperty("send"));
 
37
xcheck (LocalConnection.prototype.hasOwnProperty("connect"));
 
38
xcheck (LocalConnection.prototype.hasOwnProperty("close"));
 
39
xcheck (LocalConnection.prototype.hasOwnProperty("domain"));
 
40
check (! LocalConnection.prototype.hasOwnProperty("allowDomain"));
 
41
check (! LocalConnection.prototype.hasOwnProperty("onStatus"));
 
42
 
 
43
var rec = new LocalConnection();
34
44
 
35
45
// test the LocalConnection constuctor
36
 
check_equals (typeof(tmp), 'object');
 
46
check_equals (typeof(rec), 'object');
 
47
 
 
48
var snd = new LocalConnection();
 
49
 
 
50
// Not sure if this is a sensible test.
 
51
check(rec != snd);
37
52
 
38
53
// test the LocalConnection::close method
39
 
check_equals (typeof(tmp.close), 'function');
 
54
check_equals (typeof(rec.close), 'function');
40
55
 
41
56
// test the LocalConnection::connect method
42
 
// FIXME: this should not be failing as later we find the function
43
 
// actually works!
44
 
xcheck_equals (typeof(tmp.connnect), 'function');
 
57
check_equals (typeof(rec.connect), 'function');
45
58
 
46
59
// test the LocalConnection::domain method
47
 
check_equals (typeof(tmp.domain), 'function');
 
60
check_equals (typeof(rec.domain), 'function');
48
61
 
49
62
// test the LocalConnection::send method
50
 
check_equals (typeof(tmp.send), 'function');
 
63
check_equals (typeof(rec.send), 'function');
51
64
 
52
65
// Get the domain. By default this should be "localhost" because we
53
66
// haven't made any connections yet,
54
 
var domain = tmp.domain();
 
67
var domain = rec.domain();
55
68
check_equals (domain, "localhost");
56
69
 
57
70
// If the listen() times out waiting for a connection, it'll set the
60
73
// could always (in a normal application) check later for incoming
61
74
// connections.
62
75
 
63
 
tmp.close();
64
 
var ret = tmp.connect("lc_test");
 
76
rec.close();
 
77
result = rec.connect("lc_test");
 
78
xcheck_equals (rec.domain(), "localhost");
65
79
 
66
80
// NOTE: This test will fail if a shared memory segment of the same
67
81
// name exists. So the first time it'll pass, then it'll fail.
68
 
check_equals (ret, true);
69
 
 
70
 
tmp.close();
 
82
check_equals (result, true);
 
83
 
 
84
// Checks only for syntactical correctness, not success
 
85
result = snd.send("lc_test", "testfunc", "val");
 
86
xcheck_equals (result, true);
 
87
 
 
88
// The function name may not be send or any other LC property.
 
89
result = snd.send("lc_test", "send");
 
90
xcheck_equals (result, false);
 
91
result = snd.send("lc_test", "onStatus");
 
92
xcheck_equals (result, false);
 
93
// Numbers are also bad
 
94
result = snd.send("lc_test", 1);
 
95
xcheck_equals (result, false);
 
96
// undefined
 
97
result = snd.send("lc_test", funcname);
 
98
xcheck_equals (result, false);
 
99
 
 
100
 
 
101
// But anything else is fine.
 
102
result = snd.send("lc_test", "getSeconds");
 
103
xcheck_equals (result, true);
 
104
funcname = "onFullScreen";
 
105
result = snd.send("lc_test", funcname);
 
106
xcheck_equals (result, true);
 
107
 
 
108
rec.close();
 
109
 
 
110
totals(22);
71
111
 
72
112
#endif // OUTPUT_VERSION >= 6
73
113
 
74
 
totals();
 
114