Page MenuHomePhabricator

Add tests for handing of diff/oldid URLs
Closed, ResolvedPublic

Description

In https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1249078, @matmarex wrote:

It seems to me that we should test each possible combination of:

URL forms like: (I think they each fall into different code paths)
    ?title=Deleted&diff=101
    ?title=Deleted&oldid=100
    ?title=Deleted&oldid=101&diff=prev
    ?title=Deleted&oldid=100&diff=cur
    ?title=Deleted&oldid=100&diff=101

Where the title is:
    Not given (the query parameter is missing or an invalid title)
    Title of an existing page
    Title of a deleted page
    Title of a page that has never existed

Where each of the specified revision IDs is:
    Revision ID of an existing revision
    Revision ID of a deleted revision
    Revision ID of a revision that has never existed

If two revision IDs were given, also test cases when:
    They belong to the same page (deleted)
    They belong to the same page (existing)
    They belong to a different page (both deleted)
    They belong to a different page (both existing)
    They belong to a different page (deleted and existing)

Where the user can, or can not, view deleted pages

By "deleted" above I mean deleted using page deletion – I'm not sure where revision deletion/hiding comes into play here, but that may generate some more cases

Some of these combined cases are probably nonsensical, but it'd still be good to document how they behave (and make sure they don't unintentionally leak information about deleted revisions).

Event Timeline

Change #1271033 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/core@master] Test a bunch of interactions between title/oldid/diff params

https://gerrit.wikimedia.org/r/1271033

Change #1271033 merged by jenkins-bot:

[mediawiki/core@master] Test a bunch of interactions between title/oldid/diff params

https://gerrit.wikimedia.org/r/1271033