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 test consent requirements of sideloaded EPUB publications #298

Closed GJFR closed 1 year ago

GJFR commented 1 year ago

Add test for checking whether sideloaded EPUB publications require user consent for scripting and loading of remote resources (#297, spec).

GJFR commented 1 year ago

Perfect, thanks! This script should be sufficient:

function test_remote_scripting_support() {
  const report = document.getElementById('remote_scripting_support');
  report.textContent = 'This reading system fetched and executed a remote script.';
}
window.addEventListener('load', test_remote_scripting_support);
GJFR commented 1 year ago

Currently we check whether stylesheets are fetched and loaded without consent by simply referring to the spec's stylesheet, but this is not ideal (and this stylesheet may be subject to change in the future). Could you please host the stylesheet below as well? I think this would make the tests more future-proof and robust.

.paint_red {
  color: red
}

It's the last one, I promise 😉

GJFR commented 1 year ago

All done!