w3c / epub-tests

Test repository for EPUB3, maintained by the EPUB3 WG
https://w3c.github.io/epub-tests/
Other
22 stars 20 forks source link

Add pub-file-urls test #294

Closed GJFR closed 1 year ago

GJFR commented 1 year ago

Add test for checking whether reading systems prevent access to file URL resources (#293, spec).

Sanity check done for readings systems on MacOS (e.g. calibre, Apple Books, colibrio, EPUBReader). I also checked some outdated reading systems that are known to load file URL resources, where the test functioned correctly as well.

I will have access to Windows and Linux this evening or tomorrow, so I can test on these operating systems as well.

iherman commented 1 year ago

Thank you @GJFR. I have only cosmetic comments:

GJFR commented 1 year ago

Great, @iherman! Will prepend the requested URL for each iframe.

I'd be happy to update the test reports. However, as I currently don't have an Android smartphone at hand, I might not be able to test all reading systems.

Just a small question; next to the true and false test outcomes, there's also null. When should the latter be used?

iherman commented 1 year ago

Great, @iherman! Will prepend the requested URL for each iframe.

I'd be happy to update the test reports. However, as I currently don't have an Android smartphone at hand, I might not be able to test all reading systems.

Just a small question; next to the true and false test outcomes, there's also null. When should the latter be used?

There are actually two extra possible outcomes beyond the obvious true/false:

If you cannot test all the reading systems, do not worry about it. The original authors should actually do that. What is really important at this point that, hopefully, each of the new tests will have at least two positive test results (the more the merrier of course), because otherwise we would have to do something about the corresponding MUST statement if it is a MUST statement we are testing (if not, it is not really an issue).

iherman commented 1 year ago

I forgot to say: the default is null, ie, if the test reference doesn't appear in the list. So if you cannot test, don't worry about adding anything to the respective file.

GJFR commented 1 year ago

It's difficult to find reliable images that are by default available on any OS variant. I guess it's best to leave it out for now, and just check for access to the log files. Later on, the test could extended to look for other files (perhaps requiring the tester to create files on pre-defined paths).

I will be able to fill in the reports tonight or tomorrow, and complete this PR.