[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnash-commit
Subject:    [Gnash-commit] /srv/bzr/gnash/trunk r11714: Add test showing that
From:       Sandro Santilli <strk () keybit ! net>
Date:       2009-12-18 23:05:26
Message-ID: E1NLm4G-0005VT-HL () sv ! gnu ! org
[Download RAW message or body]

------------------------------------------------------------
revno: 11714
committer: Sandro Santilli <strk@keybit.net>
branch nick: trunk
timestamp: Sat 2009-12-19 00:05:26 +0100
message:
  Add test showing that user defined _global.String will be invoked when GetMember is \
executed on string literals modified:
  testsuite/actionscript.all/String.as


["r11714.diff" (r11714.diff)]

=== modified file 'testsuite/actionscript.all/String.as'
--- a/testsuite/actionscript.all/String.as	2009-12-17 00:20:26 +0000
+++ b/testsuite/actionscript.all/String.as	2009-12-18 23:05:26 +0000
@@ -1324,11 +1324,33 @@
 check(saved2.value.prop != saved3.value.prop);
 check(saved2.value !== saved3.value);
 
+//----------------------------------------------------------------------
+// Test that objects created from string literals will be constructed
+// by user-defined _global.String, if defined 
+//----------------------------------------------------------------------
+
+// _global isn't accessible in SWF5
+#if OUTPUT_VERSION > 5
+
+OrigString = _global.String;
+
+a='a string';
+_global.String = function() { this.id = 'wonder1'; };
+check_equals(a.id, 'wonder1'); 
+_global.String = function() { this.id = 'wonder2'; };
+check_equals(a.id, 'wonder2'); 
+_global.String = function() { this.id = 'wonder3'; };
+check_equals(a.id, 'wonder3'); 
+
+_global.String = OrigString;
+
+#endif // OUTPUT_VERISION > 5
+
 //----- END OF TESTS
 
 var baseTests = 327;
 var asmTests = 23;
-var ge6Tests = 16;
+var ge6Tests = 19;
 
 var totalTests = baseTests;
 #ifdef MING_SUPPORTS_ASM



_______________________________________________
Gnash-commit mailing list
Gnash-commit@gnu.org
http://lists.gnu.org/mailman/listinfo/gnash-commit


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic