gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11264: Fixed allowDomain for flash8


From: Jon Crider
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11264: Fixed allowDomain for flash8 so that it now returns a boolean. Updated System test cases to include changes to allowDomain and fix minor problems throughout.
Date: Wed, 15 Jul 2009 11:56:17 -0600
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 11264
committer: Jon Crider <address@hidden>
branch nick: trunk
timestamp: Wed 2009-07-15 11:56:17 -0600
message:
  Fixed allowDomain for flash8 so that it now returns a boolean. Updated System 
test cases to include changes to allowDomain and fix minor problems throughout.
modified:
  libcore/asobj/flash/system/System_as.cpp
  libcore/asobj/flash/system/System_as.h
  testsuite/actionscript.all/System.as
  testsuite/misc-haxe.all/classes.all/system/Security_as.hx
  testsuite/misc-haxe.all/classes.all/system/System_as.hx
  testsuite/network.all/test_allowDomain.cpp
    ------------------------------------------------------------
    revno: 11184.1.6
    committer: Jon Crider <address@hidden>
    branch nick: sysImpl
    timestamp: Wed 2009-07-15 10:35:45 -0600
    message:
      Fixing allowDomain() to return a boolean
    modified:
      libcore/asobj/flash/system/System_as.cpp
      libcore/asobj/flash/system/System_as.h
      testsuite/actionscript.all/System.as
      testsuite/misc-haxe.all/classes.all/system/Security_as.hx
      testsuite/misc-haxe.all/classes.all/system/System_as.hx
      testsuite/network.all/test_allowDomain.cpp
    ------------------------------------------------------------
    revno: 11184.1.7
    committer: Jon Crider <address@hidden>
    branch nick: sysImpl
    timestamp: Wed 2009-07-15 11:03:25 -0600
    message:
      merged from trunk
    modified:
      extensions/gtk2/gtkext.cpp
      extensions/mysql/mysql_db.cpp
      libbase/rc.cpp
      libbase/rc.h
      libcore/ClassHierarchy.cpp
      libcore/MovieClip.cpp
      libcore/TextField.cpp
      libcore/TextField.h
      libcore/Video.cpp
      libcore/abc_function.cpp
      libcore/asClass.cpp
      libcore/asMethod.cpp
      libcore/as_environment.cpp
      libcore/as_environment.h
      libcore/as_function.cpp
      libcore/as_function.h
      libcore/as_object.cpp
      libcore/as_object.h
      libcore/as_value.cpp
      libcore/as_value.h
      libcore/asobj/Array_as.cpp
      libcore/asobj/AsBroadcaster.cpp
      libcore/asobj/Boolean_as.cpp
      libcore/asobj/Boolean_as.h
      libcore/asobj/Color_as.cpp
      libcore/asobj/Global_as.h
      libcore/asobj/Globals.cpp
      libcore/asobj/Globals.h
      libcore/asobj/LoadableObject.cpp
      libcore/asobj/MovieClipLoader.cpp
      libcore/asobj/NetConnection_as.cpp
      libcore/asobj/NetStream_as.cpp
      libcore/asobj/Number_as.cpp
      libcore/asobj/Number_as.h
      libcore/asobj/Object.cpp
      libcore/asobj/Selection_as.cpp
      libcore/asobj/String_as.cpp
      libcore/asobj/String_as.h
      libcore/asobj/flash/accessibility/AccessibilityProperties_as.cpp
      libcore/asobj/flash/accessibility/Accessibility_as.cpp
      libcore/asobj/flash/desktop/ClipboardTransferMode_as.cpp
      libcore/asobj/flash/desktop/Clipboard_as.cpp
      libcore/asobj/flash/display/AVM1Movie_as.cpp
      libcore/asobj/flash/display/ActionScriptVersion_as.cpp
      libcore/asobj/flash/display/BitmapDataChannel_as.cpp
      libcore/asobj/flash/display/BitmapData_as.cpp
      libcore/asobj/flash/display/Bitmap_as.cpp
      libcore/asobj/flash/display/BlendMode_as.cpp
      libcore/asobj/flash/display/CapsStyle_as.cpp
      libcore/asobj/flash/display/DisplayObjectContainer_as.cpp
      libcore/asobj/flash/display/DisplayObject_as.cpp
      libcore/asobj/flash/display/FrameLabel_as.cpp
      libcore/asobj/flash/display/GradientType_as.cpp
      libcore/asobj/flash/display/Graphics_as.cpp
      libcore/asobj/flash/display/IBitmapDrawable_as.cpp
      libcore/asobj/flash/display/InteractiveObject_as.cpp
      libcore/asobj/flash/display/InterpolationMethod_as.cpp
      libcore/asobj/flash/display/JointStyle_as.cpp
      libcore/asobj/flash/display/LineScaleMode_as.cpp
      libcore/asobj/flash/display/LoaderInfo_as.cpp
      libcore/asobj/flash/display/Loader_as.cpp
      libcore/asobj/flash/display/MorphShape_as.cpp
      libcore/asobj/flash/display/MovieClip_as.cpp
      libcore/asobj/flash/display/PixelSnapping_as.cpp
      libcore/asobj/flash/display/SWFVersion_as.cpp
      libcore/asobj/flash/display/Scene_as.cpp
      libcore/asobj/flash/display/Shape_as.cpp
      libcore/asobj/flash/display/SimpleButton_as.cpp
      libcore/asobj/flash/display/SpreadMethod_as.cpp
      libcore/asobj/flash/display/Sprite_as.cpp
      libcore/asobj/flash/display/StageDisplayState_as.cpp
      libcore/asobj/flash/display/StageQuality_as.cpp
      libcore/asobj/flash/display/StageScaleMode_as.cpp
      libcore/asobj/flash/display/Stage_as.cpp
      libcore/asobj/flash/display/display_pkg.cpp
      libcore/asobj/flash/errors/EOFError_as.cpp
      libcore/asobj/flash/errors/IOError_as.cpp
      libcore/asobj/flash/errors/IllegalOperationError_as.cpp
      libcore/asobj/flash/errors/InvalidSWFError_as.cpp
      libcore/asobj/flash/errors/MemoryError_as.cpp
      libcore/asobj/flash/errors/ScriptTimeoutError_as.cpp
      libcore/asobj/flash/errors/StackOverflowError_as.cpp
      libcore/asobj/flash/events/ActivityEvent_as.cpp
      libcore/asobj/flash/events/AsyncErrorEvent_as.cpp
      libcore/asobj/flash/events/ContextMenuEvent_as.cpp
      libcore/asobj/flash/events/DataEvent_as.cpp
      libcore/asobj/flash/events/ErrorEvent_as.cpp
      libcore/asobj/flash/events/EventDispatcher_as.cpp
      libcore/asobj/flash/events/EventPhase_as.cpp
      libcore/asobj/flash/events/Event_as.cpp
      libcore/asobj/flash/events/FocusEvent_as.cpp
      libcore/asobj/flash/events/FullScreenEvent_as.cpp
      libcore/asobj/flash/events/HTTPStatusEvent_as.cpp
      libcore/asobj/flash/events/IEventDispatcher_as.cpp
      libcore/asobj/flash/events/IMEEvent_as.cpp
      libcore/asobj/flash/events/IOErrorEvent_as.cpp
      libcore/asobj/flash/events/KeyboardEvent_as.cpp
      libcore/asobj/flash/events/MouseEvent_as.cpp
      libcore/asobj/flash/events/NetStatusEvent_as.cpp
      libcore/asobj/flash/events/ProgressEvent_as.cpp
      libcore/asobj/flash/events/SecurityErrorEvent_as.cpp
      libcore/asobj/flash/events/StatusEvent_as.cpp
      libcore/asobj/flash/events/SyncEvent_as.cpp
      libcore/asobj/flash/events/TextEvent_as.cpp
      libcore/asobj/flash/events/TimerEvent_as.cpp
      libcore/asobj/flash/external/external_pkg.cpp
      libcore/asobj/flash/filters/BitmapFilterType_as.cpp
      libcore/asobj/flash/filters/BitmapFilter_as.cpp
      libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
      libcore/asobj/flash/filters/DisplacementMapFilterMode_as.cpp
      libcore/asobj/flash/flash_pkg.cpp
      libcore/asobj/flash/geom/ColorTransform_as.cpp
      libcore/asobj/flash/geom/ColorTransform_as.h
      libcore/asobj/flash/geom/Matrix_as.cpp
      libcore/asobj/flash/geom/Matrix_as.h
      libcore/asobj/flash/geom/Point_as.cpp
      libcore/asobj/flash/geom/Point_as.h
      libcore/asobj/flash/geom/Rectangle_as.cpp
      libcore/asobj/flash/geom/Transform_as.cpp
      libcore/asobj/flash/geom/Transform_as.h
      libcore/asobj/flash/geom/geom_pkg.cpp
      libcore/asobj/flash/media/ID3Info_as.cpp
      libcore/asobj/flash/media/SoundChannel_as.cpp
      libcore/asobj/flash/media/SoundLoaderContext_as.cpp
      libcore/asobj/flash/media/SoundMixer_as.cpp
      libcore/asobj/flash/media/SoundTransform_as.cpp
      libcore/asobj/flash/media/Sound_as.cpp
      libcore/asobj/flash/media/Video_as.cpp
      libcore/asobj/flash/media/media_as.cpp
      libcore/asobj/flash/net/FileFilter_as.cpp
      libcore/asobj/flash/net/IDynamicPropertyOutput_as.cpp
      libcore/asobj/flash/net/IDynamicPropertyWriter_as.cpp
      libcore/asobj/flash/net/NetConnection_as.cpp
      libcore/asobj/flash/net/NetStream_as.cpp
      libcore/asobj/flash/net/ObjectEncoding_as.cpp
      libcore/asobj/flash/net/Responder_as.cpp
      libcore/asobj/flash/net/SharedObjectFlushStatus_as.cpp
      libcore/asobj/flash/net/SharedObject_as.cpp
      libcore/asobj/flash/net/Socket_as.cpp
      libcore/asobj/flash/net/URLLoader_as.cpp
      libcore/asobj/flash/net/URLRequestHeader_as.cpp
      libcore/asobj/flash/net/URLRequestMethod_as.cpp
      libcore/asobj/flash/net/URLRequest_as.cpp
      libcore/asobj/flash/net/URLStream_as.cpp
      libcore/asobj/flash/net/URLVariables_as.cpp
      libcore/asobj/flash/net/XMLSocket_as.cpp
      libcore/asobj/flash/net/net_pkg.cpp
      libcore/asobj/flash/printing/PrintJobOptions_as.cpp
      libcore/asobj/flash/printing/PrintJobOrientation_as.cpp
      libcore/asobj/flash/printing/PrintJob_as.cpp
      libcore/asobj/flash/sampler/DeleteObjectSample_as.cpp
      libcore/asobj/flash/sampler/NewObjectSample_as.cpp
      libcore/asobj/flash/sampler/Sample_as.cpp
      libcore/asobj/flash/sampler/StackFrame_as.cpp
      libcore/asobj/flash/system/ApplicationDomain_as.cpp
      libcore/asobj/flash/system/Capabilities_as.cpp
      libcore/asobj/flash/system/IMEConversionMode_as.cpp
      libcore/asobj/flash/system/IME_as.cpp
      libcore/asobj/flash/system/LoaderContext_as.cpp
      libcore/asobj/flash/system/SecurityDomain_as.cpp
      libcore/asobj/flash/system/SecurityPanel_as.cpp
      libcore/asobj/flash/system/Security_as.cpp
      libcore/asobj/flash/text/AntiAliasType_as.cpp
      libcore/asobj/flash/text/CSMSettings_as.cpp
      libcore/asobj/flash/text/FontStyle_as.cpp
      libcore/asobj/flash/text/FontType_as.cpp
      libcore/asobj/flash/text/Font_as.cpp
      libcore/asobj/flash/text/GridFitType_as.cpp
      libcore/asobj/flash/text/StaticText_as.cpp
      libcore/asobj/flash/text/StyleSheet_as.cpp
      libcore/asobj/flash/text/TextColorType_as.cpp
      libcore/asobj/flash/text/TextDisplayMode_as.cpp
      libcore/asobj/flash/text/TextField_as.cpp
      libcore/asobj/flash/text/TextFormatAlign_as.cpp
      libcore/asobj/flash/text/TextFormat_as.cpp
      libcore/asobj/flash/text/TextLineMetrics_as.cpp
      libcore/asobj/flash/text/TextSnapshot_as.cpp
      libcore/asobj/flash/text/text_pkg.cpp
      libcore/asobj/flash/ui/ContextMenuBuiltInItems_as.cpp
      libcore/asobj/flash/ui/ContextMenu_as.cpp
      libcore/asobj/flash/ui/KeyLocation_as.cpp
      libcore/asobj/flash/ui/Mouse_as.cpp
      libcore/asobj/flash/utils/ByteArray_as.cpp
      libcore/asobj/flash/utils/Dictionary_as.cpp
      libcore/asobj/flash/utils/Endian_as.cpp
      libcore/asobj/flash/utils/IDataInput_as.cpp
      libcore/asobj/flash/utils/IDataOutput_as.cpp
      libcore/asobj/flash/utils/IExternalizable_as.cpp
      libcore/asobj/flash/utils/Proxy_as.cpp
      libcore/asobj/flash/utils/Timer_as.cpp
      libcore/asobj/flash/xml/XMLDocument_as.cpp
      libcore/asobj/flash/xml/XMLNode_as.cpp
      libcore/builtin_function.h
      libcore/debugger.cpp
      libcore/movie_root.cpp
      libcore/swf_function.cpp
      libcore/swf_function.h
      libcore/vm/ASHandlers.cpp
      libcore/vm/Machine.cpp
      libcore/vm/Machine.h
      libcore/vm/fn_call.h
      testsuite/actionscript.all/Makefile.am
      testsuite/libbase.all/gnashrc.in
      testsuite/libcore.all/AsValueTest.cpp
    ------------------------------------------------------------
    revno: 11184.1.8
    committer: Jon Crider <address@hidden>
    branch nick: sysImpl
    timestamp: Wed 2009-07-15 11:04:16 -0600
    message:
      merged from trunk
    added:
      testsuite/misc-ming.all/EmbeddedFontTest.c
    modified:
      libcore/TextField.cpp
      testsuite/misc-haxe.all/classes.all/DejaGnu.hx
      testsuite/misc-ming.all/DeviceFontTest.c
      testsuite/misc-ming.all/Makefile.am
    ------------------------------------------------------------
    revno: 11184.1.9
    committer: Jon Crider <address@hidden>
    branch nick: sysImpl
    timestamp: Wed 2009-07-15 11:54:04 -0600
    message:
      updated test cases for allowDomain
    modified:
      libcore/asobj/flash/system/System_as.cpp
      testsuite/misc-haxe.all/classes.all/system/System_as.hx
=== modified file 'libcore/asobj/flash/system/System_as.cpp'
--- a/libcore/asobj/flash/system/System_as.cpp  2009-07-14 21:47:28 +0000
+++ b/libcore/asobj/flash/system/System_as.cpp  2009-07-15 17:54:04 +0000
@@ -109,10 +109,15 @@
 /// domains that can access/modify local data
 //
 /// @param url a std::string containing the domain name
-void
+bool
 addAllowDataAccess( const std::string& url )
 {
+       size_t s = _allowDataAccess.size();
        _allowDataAccess.push_back( url );      
+
+       if( s+1 == _allowDataAccess.size()) return true;
+
+       return false;
 }
 
 
@@ -360,11 +365,18 @@
 as_value
 system_security_allowdomain(const fn_call& fn)
 {
-    LOG_ONCE(log_unimpl ("System.security.allowDomain currently stores domains 
but does nothing else") );
+       // NOTE: This is the AS2 version of allowDomain, the AS3 version is 
located
+       // in Security_as.cpp
+       bool result;
+
+       // NOTE: Once the security portion (in the VM?) of this is implemented,
+       // this should probably return true only if access to the added domain 
was
+       // successfully granted
+    LOG_ONCE(log_unimpl ("System.security.allowDomain currently stores domains 
but does nothing else. It returns true if the string was successfuly stored.") 
);
        for(unsigned int i = 0; i < fn.nargs; ++i) {
-               addAllowDataAccess( fn.arg(i).to_string());
+               result = addAllowDataAccess( fn.arg(i).to_string());
        }
-    return as_value(); 
+    return as_value(result); 
 }
 
 

=== modified file 'libcore/asobj/flash/system/System_as.h'
--- a/libcore/asobj/flash/system/System_as.h    2009-07-14 15:18:27 +0000
+++ b/libcore/asobj/flash/system/System_as.h    2009-07-15 16:35:45 +0000
@@ -42,7 +42,7 @@
 const std::vector<std::string>& getAllowDataAccess();
 
 /// add a url string to the vector of allowed domains
-void addAllowDataAccess( const std::string& url );
+bool addAllowDataAccess( const std::string& url );
 
 } // gnash namespace
 

=== modified file 'testsuite/actionscript.all/System.as'
--- a/testsuite/actionscript.all/System.as      2009-02-25 22:33:03 +0000
+++ b/testsuite/actionscript.all/System.as      2009-07-15 16:35:45 +0000
@@ -179,6 +179,8 @@
 // Tries to exec whatisthis from a particular location?
 xcheck_equals(typeof(p.launch), 'function');
 
+trace(System.security.allowDomain("um"));
+
 #if OUTPUT_VERSION > 6
  check_totals(85);
 #else

=== modified file 'testsuite/misc-haxe.all/classes.all/system/Security_as.hx'
--- a/testsuite/misc-haxe.all/classes.all/system/Security_as.hx 2009-06-01 
21:58:06 +0000
+++ b/testsuite/misc-haxe.all/classes.all/system/Security_as.hx 2009-07-15 
16:35:45 +0000
@@ -41,6 +41,9 @@
 
 // Class must be named with the _as3 suffix, as that's the same name as the 
file.
 class Security_as {
+
+       static var undef = untyped __global__["undefined"];
+
     static function main() {
 
         // Make sure we actually get a valid class        
@@ -96,6 +99,9 @@
        } else {
            DejaGnu.fail("Security::allowDomain() method doesn't exist");
        }
+    var ret = Security.allowDomain("cnn.com");
+    DejaGnu.note("ret = " + ret);
+
        if (Type.typeof(Security.allowInsecureDomain) == TFunction) {
            DejaGnu.pass("Security::allowInsecureDomain() method exists");
        } else {

=== modified file 'testsuite/misc-haxe.all/classes.all/system/System_as.hx'
--- a/testsuite/misc-haxe.all/classes.all/system/System_as.hx   2009-06-19 
21:10:38 +0000
+++ b/testsuite/misc-haxe.all/classes.all/system/System_as.hx   2009-07-15 
17:54:04 +0000
@@ -40,12 +40,14 @@
 
 // Class must be named with the _as3 suffix, as that's the same name as the 
file.
 class System_as {
+
     static function main() {
        if (Type.typeof(System) == ValueType.TObject) {
            DejaGnu.pass("System class exists");
        } else {
            DejaGnu.fail("System class doesn't exist");
        }
+       
 
 // Tests to see if all the properties exist. All these do is test for
 // existance of a property, and don't test the functionality at all. This
@@ -73,6 +75,7 @@
        }
 #end   
 
+
 // Test of useCodePage or useCodepage
 #if flash9
        if (Type.typeof(System.useCodePage) == ValueType.TBool) {
@@ -127,6 +130,7 @@
        } else {
            DejaGnu.fail("System::resume() method doesn't exist");
        }
+
 #end
 
 #if flash9
@@ -172,89 +176,89 @@
        DejaGnu.note("Warning! Capabilities is now derived from object 
directly!");
 #else
 if (untyped System.capabilities.hasOwnProperty("version")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'version' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'version' property does not 
exist");
        }
        if (untyped System.capabilities.hasOwnProperty("os")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'os' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'os' property does not 
exist");
        }       
 if (untyped System.capabilities.hasOwnProperty("manufacturer")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'manufacturer' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'manufacturer' property does 
not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("playerType")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'playerType' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'playerType' property does 
not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("serverString")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'serverString' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'serverString' property does 
not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("screenResolutionX")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'screenResolutionX' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'screenResolutionX' property 
does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("screenResolutionY")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'screenResolutionY' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'screenResolutionY' property 
does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("screenDPI")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'screenDPI' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'screenDPI' property does not 
exist");
        }
 if (untyped System.capabilities.hasOwnProperty("screenColor")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'screenColor' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'screenColor' property does 
not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("pixelAspectRatio")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'pixelAspectRatio' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'pixelAspectRatio' property 
does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("localFileReadDisable")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'localFileReadDisable' property 
exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'localFileReadDisable' 
property does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("language")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'language' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'language' property does not 
exist");
        }
 if (untyped System.capabilities.hasOwnProperty("isDebugger")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'isDebugger' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'isDebugger' property does 
not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("hasVideoEncoder")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'hasVideoEncoder' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'hasVideoEncoder' property 
does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("hasStreamingVideo")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'hasStreamingVideo' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'hasStreamingVideo' property 
does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("hasStreamingAudio")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'hasStreamingAudio' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'hasStreamingAudio' property 
does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("hasScreenPlayback")){
-       DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
+       DejaGnu.pass("System.capabilities 'hasScreenPlayback' property exists");
        } else {
-               DejaGnu.fail("System.capabilities 'hasScreenBroadcast' property 
does not exist");
+               DejaGnu.fail("System.capabilities 'hasScreenPlayback' property 
does not exist");
        }
 if (untyped System.capabilities.hasOwnProperty("hasScreenBroadcast") ){
        DejaGnu.pass("System.capabilities 'hasScreenBroadcast' property 
exists");
@@ -354,6 +358,19 @@
        } else {
            DejaGnu.fail("System.security 'allowDomain()' method doesn't 
exist");
        }
+       var result = untyped System.security.allowDomain("www.cnn.com");
+       if (untyped __typeof__(result) == 'boolean') {
+               DejaGnu.pass("allowDomain correctly returns a boolean");
+       } else {
+               DejaGnu.fail("allowDomain did not return a boolean");
+       }
+       if (untyped System.security.allowDomain("google.com")) {
+               DejaGnu.pass("google.com successfully added to allowed 
domains");
+       } else {
+               DejaGnu.fail("google.com not successfully added to allowed 
domains");
+       }
+       
+
        if (Type.typeof(untyped System.security.loadPolicyFile) == TFunction) {
            DejaGnu.pass("System.security 'loadPolicyFile()' method exists");
        } else {
@@ -365,6 +382,7 @@
            DejaGnu.fail("System.'showSettings()' method doesn't exist");
        }
 #end
+
        if (Type.typeof(untyped System.setClipboard) == TFunction) {
            DejaGnu.pass("System.'setClipboard()' method exists");
        } else {
@@ -530,11 +548,11 @@
        } else {
            DejaGnu.fail("System.capabilities.windowlessDisable is not a bool");
        }
-       DejaGnu.note("    System.capabilities.hasIME certainly fails on the pp 
on\n some platforms. There's no verification that it exists at all so far.");
-        if (Std.is(untyped System.capabilities.hasIME, Bool) ){
-         DejaGnu.pass("System.capabilities.hasIME is a bool");
+       DejaGnu.note("System.capabilities.hasIME certainly fails on the pp on\n 
some platforms. There's no verification that it exists at all so far.");
+        if (untyped __typeof__(System.capabilities.hasIME) == 'boolean' ){
+         DejaGnu.pass("System.capabilities.hasIME is a boolean");
        } else {
-           DejaGnu.fail("System.capabilities.hasIME is not a bool");
+           DejaGnu.fail("System.capabilities.hasIME is not a boolean");
        }
 #end
 
@@ -548,7 +566,7 @@
 #end
 */
        // System.exactSettings
-#if (flash6 || flash7 ||flsah8 )
+#if (flash6 || flash7 ||flash8 )
        if (Std.is(untyped System.exactSettings, Bool) ){
         DejaGnu.pass("System.exactSettings is a bool");
        } else {
@@ -589,17 +607,17 @@
        System.useCodePage = true;
        if ( System.useCodePage == true)
        {
-        DejaGnu.pass("System.useCodePage is true");
+        DejaGnu.pass("System.useCodePage set to true");
        } else {
-           DejaGnu.fail("System.useCodePage is false");
+           DejaGnu.fail("System.useCodePage was not set to true");
        }
 
        System.useCodePage = false;
        if ( System.useCodePage == false)
        {
-        DejaGnu.pass("System.useCodePage is false");
+        DejaGnu.pass("System.useCodePage set to false");
        } else {
-           DejaGnu.fail("System.useCodePage is true");
+           DejaGnu.fail("System.useCodePage was not set to false");
        }
 #else
        System.exactSettings = true;
@@ -634,13 +652,13 @@
 
 #if flash9
 #else
-if (Std.string(untyped __typeof__(System.showSettings)) == 'function') {
+if (untyped __typeof__(System.showSettings) == 'function') {
        DejaGnu.pass("Type of System.showSetting is a 'function'.");
 } else {
        DejaGnu.fail("Type of System.showSetting is not a 'function'.");
 }
 #end
-if (Std.string(untyped __typeof__(System.Product)) == 'function') {
+if (untyped __typeof__(System.Product) == 'function') {
        DejaGnu.xpass("Type of System.Product is a 'function'.");
 } else {
        DejaGnu.xfail("Type of System.Product is not a 'function'.");
@@ -686,6 +704,7 @@
 #else
 #end
 
+
 //Si
 //FIXME:
 //The following things have not been checked, since the capabilities class has 
been moved out.

=== modified file 'testsuite/network.all/test_allowDomain.cpp'
--- a/testsuite/network.all/test_allowDomain.cpp        2009-07-14 15:18:27 
+0000
+++ b/testsuite/network.all/test_allowDomain.cpp        2009-07-15 16:35:45 
+0000
@@ -31,9 +31,13 @@
 #include <fcntl.h>
 #include <iostream>
 #include <string>
+#include <vector>
 
 #include "flash/system/System_as.h"
 #include "as_object.h"
+#include "fn_call.h"
+#include "as_environment.h"
+#include "smart_ptr.h"
 #include "dejagnu.h"
 #include "log.h"
 #include "element.h"
@@ -157,6 +161,16 @@
        } else {
                runtest.fail("_allowDataAccess vector does not contain 4 
items");
        }
+       
+       // TODO: Is there a way to call system_security_allowdomain() from here?
+       //boost::intrusive_ptr<as_object> obj = new as_object();
+       //boost::intrusive_ptr<as_environment> env = new 
as_environment(obj->getVM());
+       //auto_ptr< vector <as_value> > args;
+       //args->push_back( as_value("msn.com"));
+       //fn_call fn(obj, env, args);
+       //system_security_allowdomain(fn);
+
+
 
 }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]