Specification

Conformance suite

66 test packages for IDOP 1.0 (Annex B). A Reader or Producer may claim conformance when it opens every valid package and refuses every other one with exactly the listed code.

How to run it

  1. Fetch the index, suite.json. Each case names a file in this directory and its expected outcome.
  2. Open each file with your implementation. valid means the package MUST open; any other value is the error code (§16) of the refusal your implementation MUST report.
  3. Cases are only ever added. A published case never changes its expected outcome.

With the reference command-line tool: idop validate --json <file> prints the outcome in the same form. The reference implementation passes every case; its build fails otherwise.

Files: MIT OR Apache-2.0. Error codes: registry.

Packages that MUST open (15)

CaseWhat it covers
valid-minimal.idopThe smallest package: mimetype, manifest, an entry point and one script.
valid-state-and-resources.idopSaved state under storage/, passive files under resources/, an icon.
valid-network-capability.idopA network capability bound to a credential that names no service.
valid-nested-code.idopCode split across folders, loaded by several scripts.
valid-unicode-names.idopUTF-8, NFC-normalised entry names with the UTF-8 flag.
valid-extension-data.idopData of a namespaced extension under extensions/<namespace>/.
valid-optional-feature-unknown.idopAn unknown optional feature is ignored.
valid-webassembly.idopA WebAssembly module under code/, loaded by the document with a relative fetch.
valid-modules-and-worker.idopES modules importing each other by relative specifiers, and a dedicated worker.
valid-binary-state.idopSaved state that is not text: a binary file under storage/.
valid-zip64-signature-in-content.idopEntry data that happens to contain the ZIP64 signatures; ZIP64 is recognised by its structures, not by these bytes.
valid-data-descriptor.idopAn entry written with general purpose bit 3 and a data descriptor that agrees with the central directory.
valid-archive-comment.idopAn end of central directory record with a comment; nothing follows it.
valid-words-in-comments-and-strings.idopForbidden names in comments, strings and JSON data are words, not uses (§8, rule 5).
valid-svg-namespace.idopInline SVG whose xmlns attribute is a namespace name, not a remote URL (§8, rule 3).

Packages that MUST be refused (51)

CaseExpected codeWhat it covers
zip-not-an-archive.idopIDOP-ZIP-001Not a ZIP archive at all.
zip-trailing-bytes.idopIDOP-ZIP-011Bytes after the end of the archive (a polyglot).
zip-leading-bytes.idopIDOP-ZIP-018Bytes before the first entry (a self-extracting stub).
zip-gap-between-entries.idopIDOP-ZIP-023Bytes between two local records that the central directory does not account for.
zip-hidden-local-entry.idopIDOP-ZIP-023A complete local record between two entries that the central directory does not list: what a reader walking the local headers would see.
zip-local-central-mismatch.idopIDOP-ZIP-021A local header whose CRC-32 differs from its central directory record.
zip-data-descriptor-mismatch.idopIDOP-ZIP-024A data descriptor whose CRC-32 differs from the central directory.
zip-encrypted-entry.idopIDOP-ZIP-015An entry flagged as encrypted.
zip-unsupported-method.idopIDOP-ZIP-016An entry compressed with a method other than Store or Deflate (12, bzip2).
zip-zip64-extra-field.idopIDOP-ZIP-010An entry carrying a ZIP64 extended information extra field.
zip-mimetype-extra-field.idopIDOP-ZIP-019The mimetype local header carries an extra field, which moves the media type away from offset 38.
profile-mimetype-not-first.idopIDOP-PROFILE-001mimetype is present but is not the first entry.
profile-mimetype-compressed.idopIDOP-PROFILE-001mimetype is compressed instead of Stored.
profile-wrong-media-type.idopIDOP-PROFILE-002mimetype names another media type.
profile-mimetype-line-terminator.idopIDOP-PROFILE-002mimetype followed by a line terminator.
path-traversal.idopIDOP-PATH-006An entry name with a .. segment.
path-backslash.idopIDOP-PATH-002An entry name with a backslash.
path-unknown-root.idopIDOP-PATH-010An entry outside the defined roots.
path-case-collision.idopIDOP-PATH-030Two names that collide after case folding.
path-case-fold-collision.idopIDOP-PATH-030Two names equal under Unicode full case folding but not under lowercasing (straße, STRASSE).
path-not-nfc.idopIDOP-PATH-004An entry name in NFD instead of NFC.
path-extension-namespace-uppercase.idopIDOP-PATH-012An extension namespace that is not a lowercase reverse-domain identifier.
path-windows-device.idopIDOP-PATH-008A segment that is a Windows device name.
path-directory-entry.idopIDOP-ZIP-032A directory entry; packages contain files only.
limit-compression-ratio.idopIDOP-LIMIT-004One entry expands more than 100:1 (a decompression bomb).
manifest-missing.idopIDOP-PROFILE-003No idop.json.
manifest-duplicate-key.idopIDOP-MANIFEST-001idop.json repeats an object key.
manifest-unknown-member.idopIDOP-MANIFEST-003idop.json has a member the schema does not define.
manifest-bad-application-id.idopIDOP-MANIFEST-003application.id is not reverse-domain.
manifest-credential-names-provider.idopIDOP-MANIFEST-003A credential binding names a service.
manifest-unused-credential.idopIDOP-MANIFEST-026A credential binding no capability references.
manifest-revision-lineage.idopIDOP-MANIFEST-014parentRevisionId equals revisionId.
manifest-timestamp-offset.idopIDOP-MANIFEST-015A timestamp written with +00:00 instead of Z (§7.4).
manifest-extension-key.idopIDOP-MANIFEST-003A key of extensions that is not a reverse-domain namespace.
manifest-origin-not-canonical.idopIDOP-MANIFEST-003A capability origin with an uppercase host, which is not its ASCII serialization.
manifest-origin-default-port.idopIDOP-MANIFEST-023A capability origin that names the default port 443.
manifest-duplicate-environment-id.idopIDOP-MANIFEST-027Two environment bindings with the same identifier.
unsupported-required-feature.idopIDOP-UNSUPPORTED-002A required feature the Reader does not implement.
unsupported-major-version.idopIDOP-MANIFEST-003formatVersion of a major version the Reader does not implement.
policy-active-resource.idopIDOP-POLICY-001A script under resources/.
policy-code-not-text.idopIDOP-POLICY-002A non-code file type under code/.
policy-inline-script.idopIDOP-POLICY-014Inline script in HTML.
policy-remote-url.idopIDOP-POLICY-011HTML that loads a remote resource.
policy-css-import.idopIDOP-POLICY-012CSS with @import.
policy-wasm-not-a-module.idopIDOP-POLICY-004A .wasm file under code/ that is not a WebAssembly module.
policy-wasm-outside-code.idopIDOP-POLICY-001A WebAssembly module under resources/.
policy-shared-worker.idopIDOP-POLICY-010A shared worker, which would outlive the document.
policy-service-worker.idopIDOP-POLICY-010Registering a service worker, which would outlive the document.
policy-javascript-url.idopIDOP-POLICY-010A javascript: URL in HTML.
policy-iframe.idopIDOP-POLICY-011An iframe in HTML.
policy-eval.idopIDOP-POLICY-010Dynamic evaluation in document code.