"Fossies" - the Fresh Open Source Software Archive

Member "gnash-0.8.10/testsuite/actionscript.all/Accessibility.as" (19 Jan 2012, 2235 Bytes) of package /linux/www/old/gnash-0.8.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) ActionScript source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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.
   14 //
   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
   18 //
   19 
   20 // Test case for Accessibility ActionScript class
   21 // compile this test case with Ming makeswf, and then
   22 // execute it like this gnash -1 -r 0 -v out.swf
   23 
   24 
   25 rcsid="Accessibility.as";
   26 #include "check.as"
   27 
   28 check_equals ( typeof(Accessibility), 'object' );
   29 
   30 // Accessibility object can't be instantiated !
   31 var accObj = new Accessibility;
   32 check_equals(accObj, undefined);
   33 
   34 check_equals (typeof(Accessibility.__proto__), 'object');
   35 check_equals (Accessibility.__proto__, Object.prototype);
   36 
   37 #if OUTPUT_VERSION > 5
   38 
   39 check_equals ( typeof(Accessibility.isActive), 'function' );
   40 check_equals ( typeof(Accessibility.updateProperties), 'function' );
   41 check_equals ( typeof(Accessibility.sendEvent), 'function' );
   42 
   43 check(Accessibility.hasOwnProperty("isActive"));
   44 check(Accessibility.hasOwnProperty("updateProperties"));
   45 check(Accessibility.hasOwnProperty("sendEvent"));
   46 
   47 xcheck_equals ( typeof(Accessibility.isActive()), 'boolean' );
   48 
   49 #else
   50 
   51 // SWF 5:
   52 xcheck_equals ( typeof(Accessibility.isActive), 'undefined' );
   53 xcheck_equals ( typeof(Accessibility.updateProperties), 'undefined' );
   54 xcheck_equals ( typeof(Accessibility.sendEvent), 'undefined' );
   55 
   56 #endif // OUTPUT_VERSION > 5
   57 
   58 // Methods return void (just undefined in SWF 5).
   59 check_equals ( typeof(Accessibility.updateProperties()), 'undefined' );
   60 check_equals ( typeof(Accessibility.sendEvent()), 'undefined' );
   61 
   62 #if OUTPUT_VERSION > 5
   63 check_totals(13);
   64 #else
   65 check_totals(9);
   66 #endif