[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11068: updated haxe contextmenu tes
From: |
Ben Limmer |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11068: updated haxe contextmenu test to support versions of flash other than flashv9 and > |
Date: |
Wed, 10 Jun 2009 15:59:02 -0600 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 11068
committer: Ben Limmer <address@hidden>
branch nick: trunk
timestamp: Wed 2009-06-10 15:59:02 -0600
message:
updated haxe contextmenu test to support versions of flash other than flashv9
and >
modified:
testsuite/as3/classes.all/ui/ContextMenu_as.hx
=== modified file 'testsuite/as3/classes.all/ui/ContextMenu_as.hx'
--- a/testsuite/as3/classes.all/ui/ContextMenu_as.hx 2009-06-02 02:08:31
+0000
+++ b/testsuite/as3/classes.all/ui/ContextMenu_as.hx 2009-06-10 21:59:02
+0000
@@ -30,7 +30,6 @@
#else
import flash.MovieClip;
import flash.ContextMenu;
-//import flash.ContextMenuBuiltInItems;
#end
import flash.Lib;
import Type;
@@ -42,6 +41,9 @@
// Class must be named with the _as suffix, as that's the same name as the
file.
class ContextMenu_as {
static function main() {
+ #if flash6
+ DejaGnu.note("You cannot rely on availability of ContextMenu
class with a SWF < 7");
+ #end
#if flash9
var x1:ContextMenu = new ContextMenu();
@@ -84,6 +86,45 @@
// Call this after finishing all tests. It prints out the totals.
DejaGnu.done();
#end
+
+ #if (flash7 || flash8)
+ var x2:ContextMenu = new ContextMenu();
+
+ // Make sure we actually get a valid class
+ if (Std.is(x2, ContextMenu)) {
+ DejaGnu.pass("ContextMenu class exists");
+ } else {
+ DejaGnu.fail("ContextMenu class doesn't exist");
+ }
+ // test existence of copy function
+ if (Type.typeof(x2.copy)==ValueType.TFunction) {
+ DejaGnu.pass("ContextMenu::copy() method exists");
+ } else {
+ DejaGnu.fail("ContextMenu::copy() method doesn't
exist");
+ }
+ //test existence of hideBuiltInItems function
+ if (Type.typeof(x2.hideBuiltInItems)==ValueType.TFunction) {
+ DejaGnu.pass("ContextMenu::hideBuiltInItems() method
exists");
+ } else {
+ DejaGnu.fail("ContextMenu::hideBuiltInItems() method
doesn't exist");
+ }
+
+ //check properties
+ if (Type.typeof(x2.builtInItems) == ValueType.TObject) {
+ DejaGnu.pass("ContextMenu.builtInItems property
exists");
+ } else {
+ DejaGnu.xfail("ContextMenu.builtInItems property
doesn't exist");
+ }
+
+ if (Std.is(x2.customItems, Array)) {
+ DejaGnu.pass("ContextMenu.customItems property exists");
+ } else {
+ DejaGnu.xfail("ContextMenu.customItems property doesn't
exist");
+ }
+ #end
+
+ DejaGnu.done();
+
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11068: updated haxe contextmenu test to support versions of flash other than flashv9 and >,
Ben Limmer <=