Skip to content

Commit

Permalink
Merge pull request #94 from w3c/fxl-page-spread
Browse files Browse the repository at this point in the history
Adding tests for spread and page-spread properties
  • Loading branch information
wareid committed Dec 9, 2021
2 parents 1e8f90d + 243f182 commit 66e4295
Show file tree
Hide file tree
Showing 182 changed files with 1,943 additions and 1 deletion.
Binary file added tests/fxl-layout-duplication.epub
Binary file not shown.
6 changes: 6 additions & 0 deletions tests/fxl-layout-duplication/META-INF/container.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OPS/package.opf" media-type="application/oebps-package+xml" />
</rootfiles>
</container>
55 changes: 55 additions & 0 deletions tests/fxl-layout-duplication/OPS/fixed.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
body {
width: 1200px;
height: 600px;
margin: 0;
overflow: hidden;
}

img {
position: absolute; width: 600px; height: 600px; margin: 0;
top: 0;
left: 0;
z-index: -1;
}

@font-face {
font-family: "StixTwoText";
font-weight: normal;
font-style: normal;
src: url('fonts/STIXTwoText-Regular.otf');
}

@font-face {
font-family: "le-murmure";
font-weight: normal;
font-style: normal;
src: url('fonts/le-murmure.otf');
}

h1 {
position: absolute;
top: 10px;
left: 10px;
margin: 0;
padding: 0;
font-size: 30px;
font-family: "le-murmure";
}

p {
position: absolute;
top: 80px;
left: 40px;
margin: 0;
padding: 0;
font-size: 20px;
font-family: "StixTwoText";
}

#p1, #p3 {
background-color: palegreen;
}

#p2, #p4 {
background-color: lightpink;
}
15 changes: 15 additions & 0 deletions tests/fxl-layout-duplication/OPS/nav.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:layout pre-paginated spine order</title>
</head>
<body>
<nav epub:type="toc">
<ol>
<li><a href="page_001.xhtml">Page 1</a></li>
<li><a href="page_002.xhtml">Page 2</a></li>
<li><a href="page_003.xhtml">Page 3</a></li>
<li><a href="page_004.xhtml">Page 4</a></li>
</ol>
</nav>
</body>
</html>
36 changes: 36 additions & 0 deletions tests/fxl-layout-duplication/OPS/package.opf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" xmlns:epub="http://www.idpf.org/2007/ops" version="3.0" xml:lang="en" unique-identifier="pub-id">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:coverage>Fixed Layout</dc:coverage>
<dc:creator>Wendy Reid</dc:creator>
<dc:date>2021-11-24</dc:date>
<dc:description>
When rendition:layout is duplicated, EPUBCheck must return an error.
</dc:description>
<dc:identifier id="pub-id">fxl-layout-duplication</dc:identifier>
<dc:language>en</dc:language>
<dc:title>rendition:layout duplication</dc:title>
<link rel="dcterms:rights" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"/>
<link rel="dcterms:rightsHolder" href="https://www.w3.org"/>
<meta property="dcterms:isReferencedBy">https://www.w3.org/TR/epub-33/#fxl-layout-duplication</meta>
<meta property="dcterms:modified">2021-11-24T00:00:00Z</meta>
<meta property="rendition:layout">pre-paginated</meta>
<meta property="rendition:layout">reflowable</meta>
</metadata>
<manifest>
<item id="page_001" href="page_001.xhtml" media-type="application/xhtml+xml" />
<item id="page_002" href="page_002.xhtml" media-type="application/xhtml+xml" />
<item id="page_003" href="page_003.xhtml" media-type="application/xhtml+xml" />
<item id="page_004" href="page_004.xhtml" media-type="application/xhtml+xml" />
<item id="style" href="fixed.css" media-type="text/css" />
<item id="stix-font" href="fonts/STIXTwoText-Regular.otf" media-type="font/otf" />
<item id="murmure-font" href="fonts/le-murmure.otf" media-type="font/otf" />
<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml" />
</manifest>
<spine>
<itemref idref="page_001" />
<itemref idref="page_002" />
<itemref idref="page_003" />
<itemref idref="page_004" />
</spine>
</package>
11 changes: 11 additions & 0 deletions tests/fxl-layout-duplication/OPS/page_001.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:layout duplication</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p1">
<h1>rendition:layout duplication</h1>
<p>Page 1. This test passes if EPUBCheck returns an error.</p>
</body>
</html>
11 changes: 11 additions & 0 deletions tests/fxl-layout-duplication/OPS/page_002.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:layout duplication</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p2">
<h1>rendition:layout duplication</h1>
<p>Page 2. This test passes if EPUBCheck returns an error.</p>
</body>
</html>
11 changes: 11 additions & 0 deletions tests/fxl-layout-duplication/OPS/page_003.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:layout duplication</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p3">
<h1>rendition:layout duplication</h1>
<p>Page 3. This test passes if EPUBCheck returns an error.</p>
</body>
</html>
11 changes: 11 additions & 0 deletions tests/fxl-layout-duplication/OPS/page_004.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:layout duplication</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p4">
<h1>rendition:layout duplication</h1>
<p>Page 4. This test passes if EPUBCheck returns an error.</p>
</body>
</html>
File renamed without changes.
Binary file added tests/fxl-orientation-default.epub
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added tests/fxl-orientation-duplication.epub
Binary file not shown.
File renamed without changes.
Binary file added tests/fxl-orientation-landscape.epub
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<dc:creator>Wendy Reid</dc:creator>
<dc:date>2021-11-18</dc:date>
<dc:description>rendition:orientation is landscape, Reading Systems should either display the content in landscape or inform the user it should be.</dc:description>
<dc:identifier id="pub-id">fxl-orientation_landscape</dc:identifier>
<dc:identifier id="pub-id">fxl-orientation-landscape</dc:identifier>
<dc:language>en</dc:language>
<dc:title>rendition:orientation landscape</dc:title>
<link rel="dcterms:rights" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"/>
<link rel="dcterms:rightsHolder" href="https://www.w3.org"/>
<meta property="belongs-to-collection">should</meta>
<meta property="dcterms:isReferencedBy">https://www.w3.org/TR/epub-rs-33/#orientation</meta>
<meta property="dcterms:modified">2021-11-18T00:00:00Z</meta>
<meta property="rendition:layout">pre-paginated</meta>
Expand Down
1 change: 1 addition & 0 deletions tests/fxl-orientation-landscape/mimetype
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
application/epub+zip
Binary file added tests/fxl-page-spread-center.epub
Binary file not shown.
6 changes: 6 additions & 0 deletions tests/fxl-page-spread-center/META-INF/container.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OPS/package.opf" media-type="application/oebps-package+xml" />
</rootfiles>
</container>
55 changes: 55 additions & 0 deletions tests/fxl-page-spread-center/OPS/fixed.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
body {
width: 1200px;
height: 600px;
margin: 0;
overflow: hidden;
}

img {
position: absolute; width: 600px; height: 600px; margin: 0;
top: 0;
left: 0;
z-index: -1;
}

@font-face {
font-family: "StixTwoText";
font-weight: normal;
font-style: normal;
src: url('fonts/STIXTwoText-Regular.otf');
}

@font-face {
font-family: "le-murmure";
font-weight: normal;
font-style: normal;
src: url('fonts/le-murmure.otf');
}

h1 {
position: absolute;
top: 10px;
left: 10px;
margin: 0;
padding: 0;
font-size: 30px;
font-family: "le-murmure";
}

p {
position: absolute;
top: 80px;
left: 40px;
margin: 0;
padding: 0;
font-size: 20px;
font-family: "StixTwoText";
}

#p1, #p3 {
background-color: palegreen;
}

#p2, #p4 {
background-color: lightpink;
}
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions tests/fxl-page-spread-center/OPS/nav.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:page-spread-center</title>
</head>
<body>
<nav epub:type="toc">
<ol>
<li><a href="page_001.xhtml">Page 1</a></li>
<li><a href="page_002.xhtml">Page 2</a></li>
<li><a href="page_003.xhtml">Page 3</a></li>
<li><a href="page_004.xhtml">Page 4</a></li>
</ol>
</nav>
</body>
</html>
34 changes: 34 additions & 0 deletions tests/fxl-page-spread-center/OPS/package.opf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" xmlns:epub="http://www.idpf.org/2007/ops" version="3.0" xml:lang="en" unique-identifier="pub-id">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:coverage>Fixed Layout</dc:coverage>
<dc:creator>Wendy Reid</dc:creator>
<dc:date>2021-11-24</dc:date>
<dc:description>When rendition:page-spread-center is applied to a spine item, the document should be displayed in the center of the screen and not in a synthetic spread.</dc:description>
<dc:identifier id="pub-id">fxl-page-spread-center</dc:identifier>
<dc:language>en</dc:language>
<dc:title>rendition:page-spread-center</dc:title>
<link rel="dcterms:rights" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"/>
<link rel="dcterms:rightsHolder" href="https://www.w3.org"/>
<meta property="belongs-to-collection">should</meta>
<meta property="dcterms:isReferencedBy">https://www.w3.org/TR/epub-rs-33/#page-spread-center</meta>
<meta property="dcterms:modified">2021-11-24T00:00:00Z</meta>
<meta property="rendition:layout">pre-paginated</meta>
</metadata>
<manifest>
<item id="page_001" href="page_001.xhtml" media-type="application/xhtml+xml" />
<item id="page_002" href="page_002.xhtml" media-type="application/xhtml+xml" />
<item id="page_003" href="page_003.xhtml" media-type="application/xhtml+xml" />
<item id="page_004" href="page_004.xhtml" media-type="application/xhtml+xml" />
<item id="style" href="fixed.css" media-type="text/css" />
<item id="stix-font" href="fonts/STIXTwoText-Regular.otf" media-type="font/otf" />
<item id="murmure-font" href="fonts/le-murmure.otf" media-type="font/otf" />
<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml" />
</manifest>
<spine>
<itemref idref="page_001" properties="rendition:page-spread-center"/>
<itemref idref="page_002" />
<itemref idref="page_003" />
<itemref idref="page_004" />
</spine>
</package>
10 changes: 10 additions & 0 deletions tests/fxl-page-spread-center/OPS/page_001.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:page-spread-center</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p1">
<p>Page 1. This test passes if this page is displayed in the center of the screen, not in a synthetic spread.</p>
</body>
</html>
10 changes: 10 additions & 0 deletions tests/fxl-page-spread-center/OPS/page_002.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:page-spread-center</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p2">
<p>Page 2. This test passes if the first page was displayed in the center of the screen.</p>
</body>
</html>
10 changes: 10 additions & 0 deletions tests/fxl-page-spread-center/OPS/page_003.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:page-spread-center</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p3">
<p>Page 3. This test passes if the first page was displayed in the center of the screen.</p>
</body>
</html>
10 changes: 10 additions & 0 deletions tests/fxl-page-spread-center/OPS/page_004.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
<title>rendition:page-spread-center</title>
<meta name="viewport" content="width=900, height=600" />
<link rel="stylesheet" href="fixed.css" />
</head>
<body id="p4">
<p>Page 4. This test passes if the first page was displayed in the center of the screen.</p>
</body>
</html>
1 change: 1 addition & 0 deletions tests/fxl-page-spread-center/mimetype
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
application/epub+zip
Binary file added tests/fxl-page-spread-combined.epub
Binary file not shown.
6 changes: 6 additions & 0 deletions tests/fxl-page-spread-combined/META-INF/container.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OPS/package.opf" media-type="application/oebps-package+xml" />
</rootfiles>
</container>
Loading

0 comments on commit 66e4295

Please sign in to comment.