A set of HTML pages to test a browser's compliance with ipfs://
and ipns://
URLs.
Progress: https://github.com/ipfs/community/discussions/573
- Successor to ipfs-protocol-handler-support-tests
- Tests the browser's ability to handle IPFS URLS
- Using the Web Platform Tests repository to define tests
- Testing against a variety of file types and publishing methods (
ipfs://
,ipns://
) - Tests:
-
<img src>
-
<video src>
-
<audio src>
-
<style>@import url()
-
<link rel="stylesheet">
-
<a href>
navigation (can't simulate clicks, should try test_dirver) -
<object data>
-
<iframe src>
-
<script src>
-
<script src type="module">
- JS
import from
- JS
await import()
- JS
new Worker()
(Getting errors with CORS) - JS
navigator.serviceWorker.register
- JS
window.location.href
navigation - JS
XMLHttpRequest()
- JS
fetch()
- Generate directory listing for folders
- Render empty directories
- Resolve
index.html
in a path
-
mutable.html
Tests (experimental, some things subject to change)- JS
fetch('ipfs://<CID>/example.txt', {method: 'PUT'})
- JS
fetch('ipfs://<CID>/', {method: 'PUT', body: new FormData})
- JS
fetch('ipfs://<CID>/example.txt', {method: 'DELETE'})
- JS
fetch('ipns://<key>', {method: 'POST', body: <CID>})
- JS
fetch('ipns://<key>/example.txt', {method: 'POST', body: <CID>})
- JS
fetch('ipns://<key>', {method: 'PUT', body: file})
- JS
fetch('ipns://<key>/example', {method: 'PUT', body: file})
- JS
fetch('ipns://<key>', {method: 'PUT', body: formdata})
- JS
fetch('ipns://<key>/example', {method: 'PUT', body: formdata})
- JS
fetch('ipns://<key>/example.txt', {method: 'DELETE'})
- JS
fetch('ipns://localhost?key=<name>', {method: 'GET})
- JS
fetch('ipns://localhost?key=<name>', {method: 'DELETE})
- JS
dag.html
Tests (experimental, some things subject to change)- GET
ipfs://<CID>/?format=car
- GET
ipfs://<CID>/?format=raw
- GET
ipfs://<CID>/?format=dag-json
- GET
ipfs://<CID>/?format=dag-cbor
- POST
Content-Type: application/json
?format=dag-cbor
& GET?format=dag-cbor
- POST over existing CID to add to graph
- GET
Brave Browser (as of 2021-08-13)
Agregore Browser (as of 2021-08-13)
This test suite is automatically published on Fleek via CI job.
HEAD
of the default
branch is published at https://ipfs-protocol-compliance-suite.on.fleek.co
Manual steps are:
- Set up an IPFS node
- Make sure the
IPNS_ROOT
URL inpublish-files.js
is correct (or override it via environment variable of the same name) - Run
publish-files.js
- Pin the IPFS URL somewhere like Pinata
- Update the DNS domain to point to the IPFS URL using DNSLink
- Commit and push the changes (thus updating gh-pages)