Add a SERVER_ROOT object-state mapping to the reftest harness for use from SJS files

NEW
Unassigned

Status

Testing
Reftest
--
enhancement
8 years ago
8 years ago

People

(Reporter: Waldo, Unassigned)

Tracking

({autotest-issue})

Trunk
autotest-issue
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

See the clonee for the basic idea.  The complexity for reftest is that its directory scheme is a bit more complex -- all access is dynamic and depends on the current time and an index corresponding to the test in question, versus a simple, static, predetermined path.  Figuring out the API, and implementing it by hooking into ServeFiles or something and caching that nonce-y data, is the tricky part that I leave for this separate bug.  I lack the time to do this myself just right now -- if anyone wants to take this on, feel free.
Er, the bug this is a clone of was bug 511317.

Comment 2

8 years ago
Would this allow me to write a working reftest for bug 415761?
Sure.  But, then again, it's not like you were prohibited from doing so in the past, it just meant either hardcoding the file data in the test or making a series of unintuitive file system accesses from the xpcshell process (depending on precise details of working directory and such) to do so.
(Er, as far as verb tense in comment 3 goes, I thought I was commenting on the Mochitest version of this bug -- but it's all still accurate, there's no reason you can't just copy the file's data directly into the SJS for use.)

Comment 5

8 years ago
(In reply to comment #3)
> Sure.  But, then again, it's not like you were prohibited from doing so in the
> past, it just meant either hardcoding the file data in the test
But the whole point of that test is that I need a URL to the image.

> (depending on precise details of working directory and such)
Or as I call it, unreliable.
It's perfectly reliable (at least half a dozen tests do exactly that), just not well-abstracted.  Anyone who changed the harness would have to change the tests to prevent bustage, which wouldn't be especially *simple* but which would still inevitably happen.

Comment 7

8 years ago
(In reply to comment #6)
> It's perfectly reliable (at least half a dozen tests do exactly that)
Yes, and that's why they always failed when I ran them, because of that undocumented dependency on a limited number of supported working directories.

Comment 8

8 years ago
No, this won't help me at all; the best you can do is to tell me the path to the reftest.list passed on the command line, which could be my reftest.list or it could be the master reftest.list that includes my reftest.list, or it could be a temporary reftest.list someone created for test purposes.
You need to log in before you can comment on or make changes to this bug.