patchGnash - The GNU Flash player - Patches: patch #9279, Patch to fix wrong behavior in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9279: Patch to fix wrong behavior in getURL()/MovieClip.getURL() on `undefined` and `null` target

Submitted by:  Nutchanon Wetchasit <nachanon>
Submitted on:  Sun 05 Mar 2017 11:37:12 AM UTC  
 
Category:  core Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Sandro Santilli <strk> Open/Closed:  Closed

( Jump to the original submission)

Tue 07 Mar 2017 01:32:41 PM UTC, comment #7: 

All pushed as of commit bed373ff164acbe8ac56ee340714ed00ce1c3aca

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 07 Mar 2017 11:29:04 AM UTC, comment #6: 

I'm blocked in testing by bug #50478 - will get back here as soon as that one is fixed

Sandro Santilli <strk>
Project MemberIn charge of this item.
Sun 05 Mar 2017 12:06:58 PM UTC, comment #5: 

Patch 6 of 6:
See the attached `0006_geturl-add-weird-target-tests.patch`.

This patch adds automated checks non-FSCommand usage of `getURL()` and `MovieClip.getURL()` when encountered with weird target parameter like empty "", `null`, and `undefined` to Gnash testsuite; according to reference behavior listed on bug #50393 comment 1.

Implementation notes:

  • This test is based on MakeSWF, and run under shell-based container emulation environment, with external termination (much like the `hostcmd` test).
  • This test runs on SWF version 4 to 8 as `getURL()` is available since Flash 4 onward- according to Macromedia's documentation.
  • I implemented this as a separate test runner from `hostcmd` as it cannot be run under the same HTML-mode container.
  • There's no XFAILED check, as problems are already fixed by earlier patches.

This patch does not provide HTML-based test runner, as it is beyond limit of what simple semi-automated HTML test page could do. Also, implementing the test even in semi-automated fashion would require another exotic Flash feature (FlashVars), which must be tested first.

Gnash: 0.8.11dev (patched against git 144e082 22-Feb-2017)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #39894)

Nutchanon Wetchasit <nachanon>
Sun 05 Mar 2017 11:58:15 AM UTC, comment #4: 

Patch 5 of 6:
See the attached `0005_hostcmd-test-show-player-output.patch`.

Current container-emulated `hostcmd` test runner redirected player output away to a log file and discarded it without ever printing it out to the main test log.

This patch makes the test runner print out the Gnash-side player output, enabling user to verify/debug it from `testrun.log`; like the original `extcomm` test do.

Gnash: 0.8.11dev (patched against git 144e082 22-Feb-2017)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #39893)

Nutchanon Wetchasit <nachanon>
Sun 05 Mar 2017 11:54:44 AM UTC, comment #3: 

Patch 4 of 6:
See the attached `0004_fscommand-add-function-parameter-tests.patch`.

Currently, `hostcmd` FSCommand test in Gnash testsuite does not cover function-type parameter, this patch adds it in (for both container-emulated mode and HTML mode).

Gnash: 0.8.11dev (patched against git 144e082 22-Feb-2017)
Adobe Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #39892)

Nutchanon Wetchasit <nachanon>
Sun 05 Mar 2017 11:49:45 AM UTC, comment #2: 

Patch 3 of 6:
See the attached `0003_correct-builtin-geturl-undefined-null-target.patch`.

Current Gnash treats `undefined` and `null` target parameter in built-in `getURL()` function as if they were empty string.

Flash Player, other the other hand, uses (SWF version-specific) string representation of the parameter as target. This behavior is the same in both normal and FSCommand usage.

This patch fixes Gnash implementation by replacing the special case treatment with SWF version-specific string conversion.

Corresponding 4 XFAILED check in Gnash testsuite are changed to PASSED in this patch; resulting in 16 more PASSED checks total when counted all SWF version and test method. (8 more PASSED in automated run, 8 more PASSED in browser-based run)

Side note (for the record):
MakeSWF processes `getURL("loaded.html")` into ActionGetURL2 instruction that looks more or less like `getURL("loaded.html","")`. Macromedia Flash MX 2004 also processes the call into a similar statement, though it uses an old-school ActionGetURL instead of ActionGetURL2.

Gnash: 0.8.11dev (patched against git 144e082 22-Feb-2017)
Adobe Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #39891)

Nutchanon Wetchasit <nachanon>
Sun 05 Mar 2017 11:45:27 AM UTC, comment #1: 

Patch 2 of 6:
See the attached `0002_correct-movieclip-geturl-undefined-target.patch`.

This patch makes Gnash's implementation of `MovieClip.getURL()` treat `undefined` target parameter as if it was an empty string; like Flash Player always does, no matter of SWF version.

Corresponding 2 XFAILED checks in Gnash testsuite are changed to PASSED in this patch; resulting in more 8 PASSED checks total when counted all SWF version and test method. (4 more PASSED in automated run, and 4 more PASSED in browser-based run)

Gnash: 0.8.11dev (patched against git 144e082 22-Feb-2017)
Adobe Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #39890)

Nutchanon Wetchasit <nachanon>
Sun 05 Mar 2017 11:37:12 AM UTC, original submission:  

This patch series attempts to fix bug #50393 (undefined/null getURL()/MovieClip.getURL() target problem) and few issues around them.

Patch 1 of 6:
See the attached `0001_add-builtin-fscommand-parameter-tests.patch`.

This patch adds automated checks on built-in `getURL()`-based FSCommand usage with mutltiple kind of call name and parameters to Gnash testsuite. These checks are added into MakeSWF-based `hostcmd` test (in both container-emulated and HTML mode).

Like the existing checks, they run on SWF version 5 to 8 (no logic for SWF4 yet), non-predefined FSCommand(s) are used for implementation simplicity, and XFAILED checks are used when Gnash's behavior deviates from Flash Player.

Gnash: 0.8.11dev (patched against git 144e082 22-Feb-2017)
Adobe Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

Attached Files
file #39894:  0006_geturl-add-weird-target-tests.patch added by nachanon (15KiB - application/octet-stream - Patch to add automated unusual target tests on getURL()/MovieClip.getURL())
file #39893:  0005_hostcmd-test-show-player-output.patch added by nachanon (603B - application/octet-stream - Patch to make `hostcmd` emulated container test show player output)
file #39892:  0004_fscommand-add-function-parameter-tests.patch added by nachanon (7KiB - application/octet-stream - Patch to add function-type parameter tests for getURL()/MovieClip.getURL() FSCommand)
file #39891:  0003_correct-builtin-geturl-undefined-null-target.patch added by nachanon (5KiB - application/octet-stream - Patch to correct built-in getURL()'s behavior on `undefined` and `null` target)
file #39890:  0002_correct-movieclip-geturl-undefined-target.patch added by nachanon (4KiB - application/octet-stream - Patch to correct MovieClip.getURL()'s behavior on `undefined` target)
file #39889:  0001_add-builtin-fscommand-parameter-tests.patch added by nachanon (36KiB - application/octet-stream - Patch to add automated tests on getURL()-based FSCommand)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Updated the item)
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-07 strk StatusIn Progress => Done
        Open/ClosedOpen => Closed
    2017-03-07 strk StatusNone => In Progress
        Assigned toNone => strk
    2017-03-05 nachanon Attached File- => Added 0006_geturl-add-weird-target-tests.patch, #39894
    2017-03-05 nachanon Attached File- => Added 0005_hostcmd-test-show-player-output.patch, #39893
    2017-03-05 nachanon Attached File- => Added 0004_fscommand-add-function-parameter-tests.patch, #39892
    2017-03-05 nachanon Attached File- => Added 0003_correct-builtin-geturl-undefined-null-target.patch, #39891
    2017-03-05 nachanon Attached File- => Added 0002_correct-movieclip-geturl-undefined-target.patch, #39890
    2017-03-05 nachanon Attached File- => Added 0001_add-builtin-fscommand-parameter-tests.patch, #39889

    Back to the top


    Powered by Savane 3.7