EPUB 3.3 Tests

More details about this document
Latest editor's draft:
https://w3c.github.io/epub-tests/results/
History:
Commit history
Editors:
Ivan Herman (W3C)
Dan Lazin (Google LLC)
Feedback:
GitHub w3c/epub-tests (pull requests, new issue, open issues)
public-epub3@w3.org with subject line [epub-tests] … message topic … (archives)

Abstract

Description of the EPUB 3.3 tests.

Status of This Document

This document is merely a W3C-internal document. It has no official standing of any kind and does not represent consensus of the W3C Membership.

1. Introduction

w3c/epub-tests is the repository for the the tests to validate the implementability of W3C's EPUB 3.3 specifications, specifically the core EPUB 3.3 (the specification for the EPUB format itself) and the EPUB Reading Systems 3.3 (the specification for applications that read and render EPUB files).

The development of the tests is a community effort (see the list of contributors). Everyone is welcome to contribute tests; please read the separate contribution guidelines if you are interested.

This document provides a short overview for each test, grouped into separate tables by test categories. The columns in the tables are as follows:

  1. The identification of each test, linked to the unzipped tests themselves in the GitHub repository.
  2. Conformance flag of test (i.e., must, should, or may).
  3. Title of the test.
  4. Short description of the test.
  5. References to the corresponding normative statements or sections in the EPUB 3.3 specification(s).
  6. Pointer to the (consolidated) implementation status of the test in the separate implementation report.

2. Description of the Tests

2.1 Publication Resources

Id Req Title Description Specs Ref
pub-data-urls must Data URL does not open in top-level context The XHTML content contains an img element where the src attribute is given as a data URL. The reading system must display the image rather than opening it in a new top-level browsing context. (1) (2)
pub-foreign_bad-fallback must Manifest fallback with unsupported fallback This is a test of manifest fallbacks where both the spine item and the fallback are likely to be unsupported. The spine item is a DMG, with a fallback to a PSD file. (1)
pub-foreign_image must Manifest fallback with image An HTML content file contains a PSD image, with a manifest fallback to a PNG image. This tests fallbacks for resources that are not in the spine. (1)
pub-foreign_json-spine must Manifest fallback With JSON content document in spine This EPUB uses a JSON content file in the spine, with a manifest fallback to an HTML document. If the reading system does not support JSON, it should display the HTML. (1)
pub-foreign_xml-spine must Manifest fallback with XML in spine This EPUB uses an ordinary XML content file with mimetype application/xml in the spine, with a manifest fallback to an HTML document. If the reading system does not support XML, it should display the HTML. (1)
pub-foreign_xml-suffix-spine must Manifest fallback with XML with suffix in spine This EPUB uses an custom XML content file with mimetype application/dtc+xml in the spine, with a manifest fallback to an HTML document. If the reading system does not support XML, it should display the HTML. (1)
pub-xml-external-id must XML external entity not resolved The XHTML content document contains a reference to an external entity. The reading system must not resolve it. (1)
pub-xml-names must Invalid XML element name An XHTML element has an invalid name with two successive colons. The reading system must produce an error. (1)
pub-xml-non-validating_invalid must Invalid XML navigation document The spine XML is invalid. The reading system must not display the navigation document. (1)
pub-xml-non-validating_unclosed must Unclosed XML tag An XHTML element does not have a closing tag. The reading system must produce an error. (1)

2.2 Core Media Types

Id Req Title Description Specs Ref
pub-cmt-gif must GIF image A GIF image is displayed as part of the XHTML content. (1) (2)
pub-cmt-jpeg must JPEG image A JPEG image is displayed as part of the XHTML content. (1) (2)
pub-cmt-mp3 must MP3 audio An MP3 audio file is displayed as part of the XHTML content. (1) (2)
pub-cmt-mp4 must MP4 audio An MP4 audio file is displayed as part of the XHTML content. (1) (2)
pub-cmt-opus must OPUS audio An OPUS audio file is displayed as part of the XHTML content. (1) (2)
pub-cmt-png must PNG image A PNG image is displayed as part of the XHTML content. (1) (2)
pub-cmt-svg must SVG image An SVG image is displayed as part of the XHTML content (as a reference, not embedded). (1) (2)
pub-cmt-webp must WEBP image A WEBP image is displayed as part of the XHTML content. (1) (2)

2.3 Package Documents

Id Req Title Description Specs Ref
pkg-collections-unknown must Collection with unknown role The package document contains a collection with an unknown role. The reading system must open the EPUB successfully. (1)
pkg-creator-order must Creators listed in order Several creators are listed in the package document. The reading system must not display them out of order (but it may display only the first). (1)
pkg-linked-records must Package processed with linked metadata record Reading System must process and display the title and creator metadata from the package document. An ONIX 3.0 format linked metadata record exists, but contains neither title nor creator metadata. (1) (2)
pkg-manifest-unknown must Manifest item with unknown properties The package document contains a manifest item with unknown properties. The reading system must open the EPUB successfully. (1)
pkg-manifest-unlisted-resource must Resource not listed in manifest The XHTML content references an image that does not appear in the manifest. The image should not be shown. (1)
pkg-manifest-url must Content in arbitrary directory The manifest refers to an XHTML file in an arbitrary subfolder. The reading system must be able to find the content. (1)
pkg-meta-unknown must Meta tag with unknown property The package document contains a meta tag with an unknown property. The reading system must open the EPUB successfully. (1)
pkg-meta-whitespace must Whitespace removed from package metadata The package document's title and creator contain leading and trailing spaces along with excess internal whitespace. The reading system must render only a single space in all cases. (1)
pkg-relative-url must Content in relative subdirectory The manifest refers to an XHTML file in an arbitrary subfolder that is relative to the package's own arbitrary folder. The reading system must be able to find the content. (1) (2)
must Hyperlink to duplicate items in spine The spine contains several references to the same content document. The reading system must move to the position of the first duplicate in the reading order when following a hyperlink. (1)
pkg-spine-duplicate-item-rendering must Duplicate items in spine render The spine contains several references to the same content document. The reading system must not skip the duplicates when rendering the reading order. (1)
pkg-spine-duplicate-item-ui must UI recognizes duplicate items in spine The spine contains several references to the same content document. The reading system must allow the duplicates to be independently bookmarked or otherwise recognized in the UI. (1)
pkg-spine-nonlinear-activation must Non-linear spine item is reachable An itemref in the spine is marked as non-linear. Although it (possibly) cannot be accessed through the table of contents, it can be reached from a link in the XHTML content. (1)
pkg-spine-order must Spine items in order Basic test of whether a reading system can display spine items in the correct order. The test fails if the reading system presents content in the order in which the file names sort, or if it presents files in manifest order rather than spine order. (1)
pkg-spine-order-svg must SVG spine items in order Basic test of whether a reading system can display SVG spine items in the correct order. (1)
pkg-spine-unknown must Spine item with unknown properties The package document contains a spine item with unknown properties. The reading system must open the EPUB successfully. (1)
pkg-title-order must First title in package Several titles are listed in the package document. The reading system must use the first title (and whether to use other titles is not defined). (1)
pkg-unique-id must Unique identifier not unique The package document's dc:identifier is identical across two publications. The reading system should display both publications independently. (1)
pkg-unique-id must Unique identifier reused The package document's dc:identifier is identical across two publications. The reading system should display both publications independently. (1)
pkg-version-backward must Package version less than 3.0 “Reading Systems MUST attempt to process an EPUB Publication whose Package Document version attribute is less than "3.0"”. This is an EPUB with package version attribute set to "0", to see if a reading system will open it. (1)
pkg-flow-paginated should rendition:flow set to paginated Tests on handling overflow content with the "rendition:flow" property set to "paginated". The content should be dynamically paginated (i.e., not scrolled) by the reading system. (1) (2)
pkg-flow-scrolled-continuous should rendition:flow set to scrolled-continuous Tests on handling overflow content with the "rendition:flow" property set to "scrolled-continuous". The content should be presented as one continuous scrolling document (i.e., not paginated). (1) (2)
pkg-flow-scrolled-doc should rendition:flow set to scrolled-doc Tests on handling overflow content with the "rendition:flow" property set to "scrolled-doc". Each of the chapters in this publication should be vertically scrollable, and swiping horizontally should moves from one to the next. (1) (2)

2.4 Internationalization

Id Req Title Description Specs Ref
pkg-dir-auto_root-rtl must Correct 'dir=rtl' on the package, incorrectly overwritten by 'dir=auto' on title The 'dc:title' element contains text whose proper rendering requires bidi control. The element's 'dir' attribute is set to 'auto' and the 'dir' attribute is set to 'rtl' on the package element; the title should display incorrectly. (1) (2)
pkg-dir-auto_root-unset must Incorrect 'dir=auto' on the title The 'dc:title' element contains text whose proper rendering requires bidi control. The element's 'dir' attribute is set to 'auto'; the title should display incorrectly. (1) (2)
pkg-dir_creator-rtl must 'dir=rtl' on the creator The 'dc:creator' element's 'dir' attribute is set to 'rtl'; the creator's name should display right-to-left. (1) (2)
pkg-dir_rtl-root-ltr must Incorrect 'dir=ltr' on the package, correctly overwritten by 'dir=rtl' on title The 'dc:title' element contains text whose proper rendering requires bidi control. The element's 'dir' attribute is set to 'rtl' and the 'dir' attribute is set to 'ltr' on the 'package' element; the title should display correctly. (1) (2)
pkg-dir_rtl-root-unset must Correct 'dir=rtl' on the title The 'dc:title' element contains text whose proper rendering requires bidi control. The element's 'dir' attribute is set to 'rtl'; the title should display correctly. (1) (2)
pkg-dir_unset-root-rtl must Correct 'dir=rtl' on the package The 'dc:title' element contains text whose proper rendering requires bidi control. The root's 'dir' attribute is set to 'rtl'; the title should display correctly. (1) (2)
pkg-dir_unset-root-unset must No 'dir' on the title The 'dc:title' element contains text whose proper rendering requires bidi control. The element's 'dir' attribute is not set; the title should display incorrectly. (1) (2)
pkg-spine-progression-default must RTL publication's spine has implicit 'page-progression-direction="default"' In a publication set as using an RTL language, the spine does not set 'page-progression-direction', so it is implicitly 'default'. The pages must appear from right to left. (1)
pkg-spine-progression-pre-paginated must Pre-paginated publication's spine sets 'page-progression-direction="ltr"' In a pre-paginated publication whose XHTML content sets 'dir="rtl"', the spine sets 'page-progression-direction="ltr"'. The pages must appear from left to right. (1)
pkg-spine-progression_ltr must Spine sets 'page-progression-direction="ltr"' The spine sets 'page-progression-direction="ltr"'. The pages must appear from left to right. (1)
pkg-spine-progression_rtl must Spine sets 'page-progression-direction="rtl"' The spine sets 'page-progression-direction="rtl"'. The pages must appear from right to left. (1)

2.5 Content Documents

Id Req Title Description Specs Ref
cnt-css-support must Acid2 test The Acid2 test, ported from acid2.acidtests.org, demonstrates broad CSS support. (1)
cnt-mathml-support must Support for Presentation MathML A Presentation MathML equation is displayed as part of the XHTML content. (1) (2)
cnt-svg-css-inclusion must CSS applied to included SVG CSS changes the color of an SVG image that is embedded in the XHTML content by inclusion. (1)
cnt-svg-css-reference must CSS not applied to referenced SVG CSS does not change the color of an SVG image that is embedded in the XHTML content by reference. (1)
cnt-svg-embedded must SVG embedded in XHTML content An SVG image is embedded in the XHTML content (as inline SVG). (1)
cnt-svg-support must SVG content document An SVG image is displayed as a content document (not as part of an XHTML file). (1)
cnt-xhtml-support must XHTML content document An XHTML file is displayed as a content document. (1)

2.7 Fixed Layout

Id Req Title Description Specs Ref
fxl-layout-pre-paginated must rendition:layout pre-paginated spine order When rendition:layout is pre-paginated, reading systems must display one page per spine item. (1)
fxl-layout-pre-paginated-spreads must rendition:layout pre-paginated spreads When the layout is pre-paginated, pages are displayed with no gaps when in synthetic spreads. (1)
fxl-orientation_default must rendition:orientation default rendition:orientation is not specified. Therefore, it has the value "auto" and reading systems should display the EPUB in the orientation of the device. (1) (2)
fxl-orientation_duplication must rendition:orientation duplication rendition:orientation is specified twice. EPUBCheck should produce an error. (1)
fxl-orientation_landscape must rendition:orientation landscape rendition:orientation is landscape, Reading Systems should either display the content in landscape or inform the user it should be. (1)
fxl-xhtml-icb must XHTML content clipped outside viewport XHTML content outside the initial containing block (ICB) is clipped. (1) (2)

2.8 Open Container Format

Id Req Title Description Specs Ref
ocf-package_arbitrary must Package in arbitrary directory The EPUB contains three valid package files and three corresponding sets of content documents, but only one of the packages, in an unusual subdirectory, is referenced by the container.xml file. The reading system must use this package. (1)
ocf-package_multiple must Multiple packages in container file The EPUB contains three valid package files and three corresponding sets of content documents, all referenced by the container.xml file. The reading system must use the first package. (1)

A. Acknowledgements

The following experts contributed to the test suite: