From 76ac22da4dd7c167b6b68083d87b4f5e79220dad Mon Sep 17 00:00:00 2001 From: Nutchanon Wetchasit Date: Tue, 7 Mar 2017 12:13:29 +0100 Subject: [PATCH] Add parameter type tests on getURL()-based FSCommand. See bug #50393 --- testsuite/misc-ming.all/hostcmd.as | 53 ++++++--- testsuite/misc-ming.all/hostcmd_htmltest.sh | 155 +++++++++++++++++++++----- testsuite/misc-ming.all/hostcmd_testrunner.sh | 107 +++++++++++++++--- 3 files changed, 254 insertions(+), 61 deletions(-) diff --git a/testsuite/misc-ming.all/hostcmd.as b/testsuite/misc-ming.all/hostcmd.as index 1e4689b1a..0786790db 100644 --- a/testsuite/misc-ming.all/hostcmd.as +++ b/testsuite/misc-ming.all/hostcmd.as @@ -33,27 +33,48 @@ // in JavaScript (where "*" is the value of `name` attribute on `` // or `` tag which the SWF is playing). +var arrayarg; +var objectarg; var object_customstringarg; trace("STARTOFTEST"); -this.getURL("FSCommand:"); -this.getURL("FSCommand:", "This is a string for empty call"); -this.getURL("FSCommand:noarg"); -this.getURL("FSCommand:stringarg", "This is a string"); -this.getURL("FSCommand:weirdstringarg", "!@#$%^&*()_+-={}|[]\\:\";\'<>?,./~`"); -this.getURL("FSCommand:integerarg", 9876); -this.getURL("FSCommand:floatarg", 9876.5432); -this.getURL("FSCommand:infinitearg", Infinity); -this.getURL("FSCommand:neginfinitearg", -Infinity); -this.getURL("FSCommand:nanarg", NaN); -this.getURL("FSCommand:booleanarg", true); -this.getURL("FSCommand:nullarg", null); -this.getURL("FSCommand:undefinedarg", undefined); -this.getURL("FSCommand:arrayarg", new Array("The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog")); -this.getURL("FSCommand:objectarg", new Object()); +getURL("FSCommand:"); +getURL("FSCommand:", "This is a string for empty call"); +getURL("FSCommand:noarg"); +getURL("FSCommand:stringarg", "This is a string"); +getURL("FSCommand:weirdstringarg", "!@#$%^&*()_+-={}|[]\\:\";\'<>?,./~`"); +getURL("FSCommand:integerarg", 9876); +getURL("FSCommand:floatarg", 9876.5432); +getURL("FSCommand:infinitearg", Infinity); +getURL("FSCommand:neginfinitearg", -Infinity); +getURL("FSCommand:nanarg", NaN); +getURL("FSCommand:booleanarg", true); +getURL("FSCommand:nullarg", null); +getURL("FSCommand:undefinedarg",undefined); +arrayarg = new Array("The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"); +getURL("FSCommand:arrayarg", arrayarg); +objectarg = new Object(); +getURL("FSCommand:objectarg", objectarg); object_customstringarg = new Object(); object_customstringarg.toString = function():String { return "This is a custom Object.toString()"; }; -this.getURL("FSCommand:object_customstringarg", object_customstringarg); +getURL("FSCommand:object_customstringarg", object_customstringarg); + +this.getURL("FSCommand:"); +this.getURL("FSCommand:", "This is a string for empty call"); +this.getURL("FSCommand:m_noarg"); +this.getURL("FSCommand:m_stringarg", "This is a string"); +this.getURL("FSCommand:m_weirdstringarg", "!@#$%^&*()_+-={}|[]\\:\";\'<>?,./~`"); +this.getURL("FSCommand:m_integerarg", 9876); +this.getURL("FSCommand:m_floatarg", 9876.5432); +this.getURL("FSCommand:m_infinitearg", Infinity); +this.getURL("FSCommand:m_neginfinitearg", -Infinity); +this.getURL("FSCommand:m_nanarg", NaN); +this.getURL("FSCommand:m_booleanarg", true); +this.getURL("FSCommand:m_nullarg", null); +this.getURL("FSCommand:m_undefinedarg", undefined); +this.getURL("FSCommand:m_arrayarg", arrayarg); +this.getURL("FSCommand:m_objectarg", objectarg); +this.getURL("FSCommand:m_object_customstringarg", object_customstringarg); trace("ENDOFTEST"); diff --git a/testsuite/misc-ming.all/hostcmd_htmltest.sh b/testsuite/misc-ming.all/hostcmd_htmltest.sh index 2e455a2ff..774e5b671 100644 --- a/testsuite/misc-ming.all/hostcmd_htmltest.sh +++ b/testsuite/misc-ming.all/hostcmd_htmltest.sh @@ -26,6 +26,8 @@ # The generated test runner checks Gnash (or proprietary player) for: # * Support of FSCommand call via MovieClip.getURL() (bug #46944) # +# * Undefined FSCommand parameter passing via MovieClip.getURL() (bug #50393) +# # # Usage: # ./hostcmd_htmltest.sh @@ -185,14 +187,34 @@ cat << EOF var arrayarg_call = 0; var objectarg_call = 0; var object_customstringarg_call = 0; + var m_noarg_call = 0; + var m_stringarg_call = 0; + var m_weirdstringarg_call = 0; + var m_integerarg_call = 0; + var m_floatarg_call = 0; + var m_infinitearg_call = 0; + var m_neginfinitearg_call = 0; + var m_nanarg_call = 0; + var m_booleanarg_call = 0; + var m_nullarg_call = 0; + var m_undefinedarg_call = 0; + var m_arrayarg_call = 0; + var m_objectarg_call = 0; + var m_object_customstringarg_call = 0; function player_DoFSCommand(cmd, arg) { if("" == cmd) { noname_call++; if (noname_call == 1) { + check_equals(typeof(arg), "string", "getURL-based no-name FSCommand call with no parameter should pass string-type parameter"); + check_equals(arg, "", "getURL-based no-name FSCommand call with no-parameter should pass an empty string parameter"); + } else if(noname_call == 2) { + check_equals(typeof(arg), "string", "getURL-based no-name FSCommand call with string parameter should pass string-type parameter"); + check_equals(arg, "This is a string for empty call", "getURL-based no-name FSCommand call with string parameter should pass a correct string parameter value"); + } else if(noname_call == 3) { check_equals(typeof(arg), "string", "MovieClip-based no-name FSCommand call with no parameter should pass string-type parameter"); check_equals(arg, "", "MovieClip-based no-name FSCommand call with no-parameter should pass an empty string parameter"); - } else if(noname_call == 2) { + } else if(noname_call == 4) { check_equals(typeof(arg), "string", "MovieClip-based no-name FSCommand call with string parameter should pass string-type parameter"); check_equals(arg, "This is a string for empty call", "MovieClip-based no-name FSCommand call with string parameter should pass a correct string parameter value"); } else { @@ -200,61 +222,120 @@ cat << EOF } } else if("noarg" == cmd) { noarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with no parameter should pass string-type parameter"); - check_equals(arg, "", "MovieClip-based FSCommand call with no parameter should pass an empty string parameter value"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with no parameter should pass string-type parameter"); + check_equals(arg, "", "getURL-based FSCommand call with no parameter should pass an empty string parameter value"); } else if("stringarg" == cmd) { stringarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with string parameter should pass string-type parameter"); - check_equals(arg, "This is a string", "MovieClip-based FSCommand call with string parameter should pass a correct string parameter value"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with string parameter should pass string-type parameter"); + check_equals(arg, "This is a string", "getURL-based FSCommand call with string parameter should pass a correct string parameter value"); } else if("weirdstringarg" == cmd) { // Currently, this FSCommand won't run under libgnashplugin, // due to its internal parameter parsing issue. weirdstringarg_call++; - xcheck_equals(typeof(arg),"string", "MovieClip-based FSCommand call with string parameter full of symbols should pass string-type parameter"); - xcheck_equals(arg,"!@#\$%^&*()_+-={}|[]\\\\:\";\'<>?,./~\`", "Full-of-symbols string parameter value of MovieClip-based FSCommand call should be passed correctly"); + xcheck_equals(typeof(arg),"string", "getURL-based FSCommand call with string parameter full of symbols should pass string-type parameter"); + xcheck_equals(arg,"!@#\$%^&*()_+-={}|[]\\\\:\";\'<>?,./~\`", "Full-of-symbols string parameter value of getURL-based FSCommand call should be passed correctly"); } else if("integerarg" == cmd) { integerarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with integer parameter should pass string-type parameter"); - check_equals(arg, "9876", "MovieClip-based FSCommand call should pass a correct string representation of integer parameter value"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with integer parameter should pass string-type parameter"); + check_equals(arg, "9876", "getURL-based FSCommand call should pass a correct string representation of integer parameter value"); } else if("floatarg" == cmd) { floatarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with floating point parameter should pass string-type parameter"); - check_equals(arg, "9876.5432", "MovieClip-based FSCommand call should pass a correct string representation of floating point parameter value"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with floating point parameter should pass string-type parameter"); + check_equals(arg, "9876.5432", "getURL-based FSCommand call should pass a correct string representation of floating point parameter value"); } else if("infinitearg" == cmd) { infinitearg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with infinity parameter should pass string-type parameter"); - check_equals(arg, "Infinity", "MovieClip-based FSCommand call should pass a correct string representation of infinity parameter"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with infinity parameter should pass string-type parameter"); + check_equals(arg, "Infinity", "getURL-based FSCommand call should pass a correct string representation of infinity parameter"); } else if("neginfinitearg" == cmd) { neginfinitearg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with negative infinity parameter should pass string-type parameter"); - check_equals(arg, "-Infinity", "MovieClip-based FSCommand call should pass a correct string representation of negative infinity parameter value"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with negative infinity parameter should pass string-type parameter"); + check_equals(arg, "-Infinity", "getURL-based FSCommand call should pass a correct string representation of negative infinity parameter value"); } else if("nanarg" == cmd) { nanarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with not-a-number parameter should pass string-type parameter"); - check_equals(arg, "NaN", "MovieClip-based FSCommand call should pass a correct string representation of not-a-number parameter value"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with not-a-number parameter should pass string-type parameter"); + check_equals(arg, "NaN", "getURL-based FSCommand call should pass a correct string representation of not-a-number parameter value"); } else if("booleanarg" == cmd) { booleanarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with boolean parameter should pass string-type parameter"); - check_equals(arg, "true", "MovieClip-based FSCommand call should pass a correct string representation of boolean parameter value"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with boolean parameter should pass string-type parameter"); + check_equals(arg, "true", "getURL-based FSCommand call should pass a correct string representation of boolean parameter value"); } else if("nullarg" == cmd) { nullarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with null parameter should pass string-type parameter"); - check_equals(arg, "null", "MovieClip-based FSCommand call should pass a correct string representation of null parameter"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with null parameter should pass string-type parameter"); + xcheck_equals(arg, "null", "getURL-based FSCommand call should pass a correct string representation of null parameter"); } else if("undefinedarg" == cmd) { undefinedarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with undefined parameter should pass string-type parameter"); - xcheck_equals(arg, "", "MovieClip-based FSCommand call should pass an empty string as a representation of undefined parameter"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with undefined parameter should pass string-type parameter"); + xcheck_equals(arg, "undefined", "getURL-based FSCommand call should pass a correct string representation of undefined parameter"); } else if("arrayarg" == cmd) { arrayarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with array parameter should pass string-type parameter"); - check_equals(arg, "The,quick,brown,fox,jumps,over,the,lazy,dog", "Array parameter value of MovieClip-based FSCommand call should be passed correctly as CSV string"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with array parameter should pass string-type parameter"); + check_equals(arg, "The,quick,brown,fox,jumps,over,the,lazy,dog", "Array parameter value of getURL-based FSCommand call should be passed correctly as CSV string"); } else if("objectarg" == cmd) { objectarg_call++; - check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with object parameter should pass string-type parameter"); - check_equals(arg, "[object Object]", "String representation of Object parameter of MovieClip-based FSCommand call should be correctly passed"); + check_equals(typeof(arg), "string", "getURL-based FSCommand call with object parameter should pass string-type parameter"); + check_equals(arg, "[object Object]", "String representation of object parameter of getURL-based FSCommand call should be correctly passed"); } else if("object_customstringarg" == cmd) { object_customstringarg_call++; + check_equals(typeof(arg), "string", "getURL-based FSCommand call with object parameter bearing custom toString() should pass string-type parameter"); + check_equals(arg, "This is a custom Object.toString()", "Custom string representation of object parameter of getURL-based FSCommand call should be correctly passed"); + } else if("m_noarg" == cmd) { + m_noarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with no parameter should pass string-type parameter"); + check_equals(arg, "", "MovieClip-based FSCommand call with no parameter should pass an empty string parameter value"); + } else if("m_stringarg" == cmd) { + m_stringarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with string parameter should pass string-type parameter"); + check_equals(arg, "This is a string", "MovieClip-based FSCommand call with string parameter should pass a correct string parameter value"); + } else if("m_weirdstringarg" == cmd) { + // Currently, this FSCommand won't run under libgnashplugin, + // due to its internal parameter parsing issue. + + m_weirdstringarg_call++; + xcheck_equals(typeof(arg),"string", "MovieClip-based FSCommand call with string parameter full of symbols should pass string-type parameter"); + xcheck_equals(arg,"!@#\$%^&*()_+-={}|[]\\\\:\";\'<>?,./~\`", "Full-of-symbols string parameter value of MovieClip-based FSCommand call should be passed correctly"); + } else if("m_integerarg" == cmd) { + m_integerarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with integer parameter should pass string-type parameter"); + check_equals(arg, "9876", "MovieClip-based FSCommand call should pass a correct string representation of integer parameter value"); + } else if("m_floatarg" == cmd) { + m_floatarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with floating point parameter should pass string-type parameter"); + check_equals(arg, "9876.5432", "MovieClip-based FSCommand call should pass a correct string representation of floating point parameter value"); + } else if("m_infinitearg" == cmd) { + m_infinitearg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with infinity parameter should pass string-type parameter"); + check_equals(arg, "Infinity", "MovieClip-based FSCommand call should pass a correct string representation of infinity parameter"); + } else if("m_neginfinitearg" == cmd) { + m_neginfinitearg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with negative infinity parameter should pass string-type parameter"); + check_equals(arg, "-Infinity", "MovieClip-based FSCommand call should pass a correct string representation of negative infinity parameter value"); + } else if("m_nanarg" == cmd) { + m_nanarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with not-a-number parameter should pass string-type parameter"); + check_equals(arg, "NaN", "MovieClip-based FSCommand call should pass a correct string representation of not-a-number parameter value"); + } else if("m_booleanarg" == cmd) { + m_booleanarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with boolean parameter should pass string-type parameter"); + check_equals(arg, "true", "MovieClip-based FSCommand call should pass a correct string representation of boolean parameter value"); + } else if("m_nullarg" == cmd) { + m_nullarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with null parameter should pass string-type parameter"); + check_equals(arg, "null", "MovieClip-based FSCommand call should pass a correct string representation of null parameter"); + } else if("m_undefinedarg" == cmd) { + m_undefinedarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with undefined parameter should pass string-type parameter"); + xcheck_equals(arg, "", "MovieClip-based FSCommand call should pass an empty string as a representation of undefined parameter"); + } else if("m_arrayarg" == cmd) { + m_arrayarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with array parameter should pass string-type parameter"); + check_equals(arg, "The,quick,brown,fox,jumps,over,the,lazy,dog", "Array parameter value of MovieClip-based FSCommand call should be passed correctly as CSV string"); + } else if("m_objectarg" == cmd) { + m_objectarg_call++; + check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with object parameter should pass string-type parameter"); + check_equals(arg, "[object Object]", "String representation of object parameter of MovieClip-based FSCommand call should be correctly passed"); + } else if("m_object_customstringarg" == cmd) { + m_object_customstringarg_call++; check_equals(typeof(arg), "string", "MovieClip-based FSCommand call with object parameter bearing custom toString() should pass string-type parameter"); check_equals(arg, "This is a custom Object.toString()", "Custom string representation of object parameter of MovieClip-based FSCommand call should be correctly passed"); } else { @@ -263,7 +344,8 @@ cat << EOF } function verify_flash() { - check_equals(noname_call, 2, "No-name FSCommand should be called for 2 times"); + check_equals(noname_call, 4, "No-name FSCommand should be called for 4 times"); + check_equals(noarg_call, 1, "\"noarg\" FSCommand should be called for 1 time"); check_equals(stringarg_call, 1, "\"stringarg\" FSCommand should be called for 1 time"); xcheck_equals(weirdstringarg_call, 1, "\"weirdstringarg\" FSCommand should be called for 1 time"); @@ -279,7 +361,22 @@ cat << EOF check_equals(objectarg_call, 1, "\"objectarg\" FSCommand should be called for 1 time"); check_equals(object_customstringarg_call, 1, "\"object_customstringarg\" FSCommand should be called for 1 time"); - xcheck_totals(47); + check_equals(m_noarg_call, 1, "\"m_noarg\" FSCommand should be called for 1 time"); + check_equals(m_stringarg_call, 1, "\"m_stringarg\" FSCommand should be called for 1 time"); + xcheck_equals(m_weirdstringarg_call, 1, "\"m_weirdstringarg\" FSCommand should be called for 1 time"); + check_equals(m_integerarg_call, 1, "\"m_integerarg\" FSCommand should be called for 1 time"); + check_equals(m_floatarg_call, 1, "\"m_floatarg\" FSCommand should be called for 1 time"); + check_equals(m_infinitearg_call, 1, "\"m_infinitearg\" FSCommand should be called for 1 time"); + check_equals(m_neginfinitearg_call, 1, "\"m_neginfinitearg\" FSCommand should be called for 1 time"); + check_equals(m_nanarg_call, 1, "\"m_nanarg\" FSCommand should be called for 1 time"); + check_equals(m_booleanarg_call, 1, "\"m_booleanarg\" FSCommand should be called for 1 time"); + check_equals(m_nullarg_call, 1, "\"m_nullarg\" FSCommand should be called for 1 time"); + check_equals(m_undefinedarg_call, 1, "\"m_undefinedarg\" FSCommand should be called for 1 time"); + check_equals(m_arrayarg_call, 1, "\"m_arrayarg\" FSCommand should be called for 1 time"); + check_equals(m_objectarg_call, 1, "\"m_objectarg\" FSCommand should be called for 1 time"); + check_equals(m_object_customstringarg_call, 1, "\"m_object_customstringarg\" FSCommand should be called for 1 time"); + + xcheck_totals(93); } setTimeout("verify_flash()",3000); diff --git a/testsuite/misc-ming.all/hostcmd_testrunner.sh b/testsuite/misc-ming.all/hostcmd_testrunner.sh index 3b36f2df4..509d5a65a 100644 --- a/testsuite/misc-ming.all/hostcmd_testrunner.sh +++ b/testsuite/misc-ming.all/hostcmd_testrunner.sh @@ -26,6 +26,8 @@ # The generated test runner checks Gnash for: # * Support of FSCommand call via MovieClip.getURL() (bug #46944) # +# * Undefined FSCommand parameter passing via MovieClip.getURL() (bug #50393) +# # # Usage: # ./hostcmd_testrunner.sh @@ -79,6 +81,7 @@ cat << EOF LOGFILE=${top_builddir}/testoutlog.\$\$ PIPE2CONTAINER=${top_builddir}/tocontainer.\$\$ PIPE2PLAYER=${top_builddir}/toplayer.\$\$ +STARTTIMEOUT=10 READTIMEOUT=5 # Test counts @@ -168,7 +171,7 @@ check_error \$? "Failed to open a named pipe: \$PIPE2PLAYER" GNASHPID=\$! # Wait until the SWF code start running, by loop-checking logfile -STARTCOUNTDOWN=\$READTIMEOUT +STARTCOUNTDOWN=\$STARTTIMEOUT while [ \$STARTCOUNTDOWN -gt 0 ] do if grep "TRACE: STARTOFTEST" "\$LOGFILE" 2>&1 > /dev/null @@ -182,6 +185,78 @@ done [ \$STARTCOUNTDOWN -ne 0 ] check_equals \$? 0 "Gnash-side ActionScript code should be successfully started" +# +# getURL-based FSCommand tests +# + +# Read for no-name no-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" '' "Gnash should correctly pass getURL-based no-name FSCommand call with no parameter" + +# Read for no-name string-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'This is a string for empty call' "Gnash should correctly pass getURL-based no-name FSCommand call with string parameter" + +# Read for no-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'noarg' "Gnash should correctly pass getURL-based FSCommand call with no parameter" + +# Read for string-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'stringargThis is a string' "Gnash should correctly pass getURL-based FSCommand call with string parameter" + +# Read for full-of-symbols-string-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +xcheck_equals "\$LINE" "weirdstringarg!@#\\\$%^&*()_+-={}|[]:\";'<>?,./~\\\`" "Gnash should correctly pass getURL-based FSCommand call with full-of-symbols string parameter" + +# Read for integer-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'integerarg9876' "Gnash should correctly pass getURL-based FSCommand call with integer parameter" + +# Read for floating-point-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'floatarg9876.5432' "Gnash should correctly pass getURL-based FSCommand call with floating point parameter" + +# Read for infinity-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'infiniteargInfinity' "Gnash should correctly pass getURL-based FSCommand call with infinity parameter" + +# Read for negative-infinity-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'neginfinitearg-Infinity' "Gnash should correctly pass getURL-based FSCommand call with negative infinity parameter" + +# Read for not-a-number-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'nanargNaN' "Gnash should correctly pass getURL-based FSCommand call with not-a-number parameter" + +# Read for boolean-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'booleanargtrue' "Gnash should correctly pass getURL-based FSCommand call with boolean parameter" + +# Read for null-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +xcheck_equals "\$LINE" 'nullargnull' "Gnash should correctly pass getURL-based FSCommand call with null parameter" + +# Read for undefined-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +xcheck_equals "\$LINE" 'undefinedargundefined' "Gnash should correctly pass getURL-based FSCommand call with undefined parameter" + +# Read for array-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'arrayargThe,quick,brown,fox,jumps,over,the,lazy,dog' "Gnash should correctly pass getURL-based FSCommand call with array parameter" + +# Read for object-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'objectarg[object Object]' "Gnash should correctly pass getURL-based FSCommand call with object parameter" + +# Read for object-with-custom-string-parameter FSCommand statement +read_timeout LINE \$READTIMEOUT <&3 +check_equals "\$LINE" 'object_customstringargThis is a custom Object.toString()' "Gnash should correctly pass getURL-based FSCommand call with object parameter bearing custom toString()" + +# +# MovieClip-based FSCommand tests +# + # Read for no-name no-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 check_equals "\$LINE" '' "Gnash should correctly pass MovieClip-based no-name FSCommand call with no parameter" @@ -192,59 +267,59 @@ check_equals "\$LINE" 'noarg' "Gnash should correctly pass MovieClip-based FSCommand call with no parameter" +check_equals "\$LINE" 'm_noarg' "Gnash should correctly pass MovieClip-based FSCommand call with no parameter" # Read for string-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'stringargThis is a string' "Gnash should correctly pass MovieClip-based FSCommand call with string parameter" +check_equals "\$LINE" 'm_stringargThis is a string' "Gnash should correctly pass MovieClip-based FSCommand call with string parameter" # Read for full-of-symbols-string-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -xcheck_equals "\$LINE" "weirdstringarg!@#\\\$%^&*()_+-={}|[]:\";'<>?,./~\\\`" "Gnash should correctly pass MovieClip-based FSCommand call with full-of-symbols string parameter" +xcheck_equals "\$LINE" "m_weirdstringarg!@#\\\$%^&*()_+-={}|[]:\";'<>?,./~\\\`" "Gnash should correctly pass MovieClip-based FSCommand call with full-of-symbols string parameter" # Read for integer-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'integerarg9876' "Gnash should correctly pass MovieClip-based FSCommand call with integer parameter" +check_equals "\$LINE" 'm_integerarg9876' "Gnash should correctly pass MovieClip-based FSCommand call with integer parameter" # Read for floating-point-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'floatarg9876.5432' "Gnash should correctly pass MovieClip-based FSCommand call with floating point parameter" +check_equals "\$LINE" 'm_floatarg9876.5432' "Gnash should correctly pass MovieClip-based FSCommand call with floating point parameter" # Read for infinity-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'infiniteargInfinity' "Gnash should correctly pass MovieClip-based FSCommand call with infinity parameter" +check_equals "\$LINE" 'm_infiniteargInfinity' "Gnash should correctly pass MovieClip-based FSCommand call with infinity parameter" # Read for negative-infinity-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'neginfinitearg-Infinity' "Gnash should correctly pass MovieClip-based FSCommand call with negative infinity parameter" +check_equals "\$LINE" 'm_neginfinitearg-Infinity' "Gnash should correctly pass MovieClip-based FSCommand call with negative infinity parameter" # Read for not-a-number-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'nanargNaN' "Gnash should correctly pass MovieClip-based FSCommand call with not-a-number parameter" +check_equals "\$LINE" 'm_nanargNaN' "Gnash should correctly pass MovieClip-based FSCommand call with not-a-number parameter" # Read for boolean-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'booleanargtrue' "Gnash should correctly pass MovieClip-based FSCommand call with boolean parameter" +check_equals "\$LINE" 'm_booleanargtrue' "Gnash should correctly pass MovieClip-based FSCommand call with boolean parameter" # Read for null-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'nullargnull' "Gnash should correctly pass MovieClip-based FSCommand call with null parameter" +check_equals "\$LINE" 'm_nullargnull' "Gnash should correctly pass MovieClip-based FSCommand call with null parameter" # Read for undefined-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -xcheck_equals "\$LINE" 'undefinedarg' "Gnash should pass undefined parameter of MovieClip-based FSCommand call as empty string" +xcheck_equals "\$LINE" 'm_undefinedarg' "Gnash should pass undefined parameter of MovieClip-based FSCommand call as empty string" # Read for array-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'arrayargThe,quick,brown,fox,jumps,over,the,lazy,dog' "Gnash should correctly pass MovieClip-based FSCommand call with array parameter" +check_equals "\$LINE" 'm_arrayargThe,quick,brown,fox,jumps,over,the,lazy,dog' "Gnash should correctly pass MovieClip-based FSCommand call with array parameter" # Read for object-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'objectarg[object Object]' "Gnash should correctly pass MovieClip-based FSCommand call with object parameter" +check_equals "\$LINE" 'm_objectarg[object Object]' "Gnash should correctly pass MovieClip-based FSCommand call with object parameter" # Read for object-with-custom-string-parameter FSCommand statement read_timeout LINE \$READTIMEOUT <&3 -check_equals "\$LINE" 'object_customstringargThis is a custom Object.toString()' "Gnash should correctly pass MovieClip-based FSCommand call with object parameter bearing custom toString()" +check_equals "\$LINE" 'm_object_customstringargThis is a custom Object.toString()' "Gnash should correctly pass MovieClip-based FSCommand call with object parameter bearing custom toString()" # Close pipes exec 3<&- @@ -255,7 +330,7 @@ kill \$GNASHPID wait \$GNASHPID # Check for total number of test run -check_totals "17" "There should be 17 tests run" +check_totals "33" "There should be 33 tests run" # Remove temporary files rm "\$LOGFILE" -- 2.11.4.GIT