1
0
Fork 0
mirror of https://github.com/openseadragon/openseadragon.git synced 2025-03-29 03:39:50 +03:00

Improved testing data for IIIFv3

This commit adds a new set of tests for IIIFv3 Image API info
to the `formats` tests. These tests mirror the tests done for the v2
handler, but with updated 'info.json' files.

Image directories also needed to be changed to include the full width/height
parameters.

Also changed was moving the `iiif` test block up below formats, and adding a QUnit
module name. This allowed the tests to show up in the QUnit browser test.

All of the new tests were checked and pass.
This commit is contained in:
Andrew Hankinson 2022-06-16 12:58:41 +02:00
parent 820564dd3e
commit 7a97d524f8
56 changed files with 55 additions and 2 deletions
test
data
iiif_3_0_sizes
full
1600,1164/0
3200,2328/0
400,291/0
6976,5074/0
800,582/0
info.json
iiif_3_0_tiled
0,0,256,256/256,256/0
0,0,512,512/256,256/0
0,0,775,1024/194,256/0
0,256,256,256/256,256/0
0,512,256,256/256,256/0
0,512,512,512/256,256/0
0,768,256,256/256,256/0
256,0,256,256/256,256/0
256,256,256,256/256,256/0
256,512,256,256/256,256/0
256,768,256,256/256,256/0
512,0,256,256/256,256/0
512,0,263,512/132,256/0
512,256,256,256/256,256/0
512,512,256,256/256,256/0
512,512,263,512/132,256/0
512,768,256,256/256,256/0
768,0,7,256/7,256/0
768,256,7,256/7,256/0
768,512,7,256/7,256/0
768,768,7,256/7,256/0
full
info.json
iiif_3_0_tiled_sf1
0,0,256,256/256,256/0
0,256,256,256/256,256/0
0,512,256,256/256,256/0
0,768,256,256/256,256/0
256,0,256,256/256,256/0
256,256,256,256/256,256/0
256,512,256,256/256,256/0
256,768,256,256/256,256/0
512,0,256,256/256,256/0
512,256,256,256/256,256/0
512,512,256,256/256,256/0
512,768,256,256/256,256/0
768,0,7,256/7,256/0
768,256,7,256/7,256/0
768,512,7,256/7,256/0
768,768,7,256/7,256/0
info.json
modules
test.html

Binary file not shown.

After

(image error) Size: 208 KiB

Binary file not shown.

After

(image error) Size: 678 KiB

Binary file not shown.

After

(image error) Size: 22 KiB

Binary file not shown.

After

(image error) Size: 1.8 MiB

Binary file not shown.

After

(image error) Size: 67 KiB

View file

@ -0,0 +1,15 @@
{
"@context": "http://iiif.io/api/image/3/context.json",
"id": "http://localhost:8000/test/data/iiif_3_0_sizes",
"protocol": "http://iiif.io/api/image",
"width": 6976,
"height": 5074,
"profile": "level0",
"sizes" : [
{"width" : 400, "height" : 291},
{"width" : 800, "height" : 582},
{"width" : 1600, "height" : 1164},
{"width" : 3200, "height": 2328},
{"width" : 6976, "height": 5074}
]
}

Binary file not shown.

After

(image error) Size: 19 KiB

Binary file not shown.

After

(image error) Size: 32 KiB

Binary file not shown.

After

(image error) Size: 22 KiB

Binary file not shown.

After

(image error) Size: 27 KiB

Binary file not shown.

After

(image error) Size: 27 KiB

Binary file not shown.

After

(image error) Size: 27 KiB

Binary file not shown.

After

(image error) Size: 11 KiB

Binary file not shown.

After

(image error) Size: 23 KiB

Binary file not shown.

After

(image error) Size: 36 KiB

Binary file not shown.

After

(image error) Size: 35 KiB

Binary file not shown.

After

(image error) Size: 15 KiB

Binary file not shown.

After

(image error) Size: 15 KiB

Binary file not shown.

After

(image error) Size: 11 KiB

Binary file not shown.

After

(image error) Size: 20 KiB

Binary file not shown.

After

(image error) Size: 19 KiB

Binary file not shown.

After

(image error) Size: 9.9 KiB

Binary file not shown.

After

(image error) Size: 11 KiB

Binary file not shown.

After

(image error) Size: 717 B

Binary file not shown.

After

(image error) Size: 716 B

Binary file not shown.

After

(image error) Size: 717 B

Binary file not shown.

After

(image error) Size: 712 B

Binary file not shown.

After

(image error) Size: 633 B

Binary file not shown.

After

(image error) Size: 810 B

Binary file not shown.

After

(image error) Size: 663 B

Binary file not shown.

After

(image error) Size: 1.2 KiB

Binary file not shown.

After

(image error) Size: 675 B

Binary file not shown.

After

(image error) Size: 2.6 KiB

Binary file not shown.

After

(image error) Size: 683 B

Binary file not shown.

After

(image error) Size: 7.1 KiB

View file

@ -0,0 +1,11 @@
{
"@context": "http://iiif.io/api/image/3/context.json",
"id": "http://localhost:8000/test/data/iiif_3_0_tiled",
"protocol": "http://iiif.io/api/image",
"height": 1024,
"width": 775,
"tiles" : [{"width":256, "scaleFactors":[1,2,4,8]}],
"profile": "level2",
"extraQualities": ["bitonal", "grey", "color"],
"extraFormats": ["jpg", "png", "gif" ]
}

Binary file not shown.

After

(image error) Size: 19 KiB

Binary file not shown.

After

(image error) Size: 27 KiB

Binary file not shown.

After

(image error) Size: 27 KiB

Binary file not shown.

After

(image error) Size: 11 KiB

Binary file not shown.

After

(image error) Size: 23 KiB

Binary file not shown.

After

(image error) Size: 36 KiB

Binary file not shown.

After

(image error) Size: 35 KiB

Binary file not shown.

After

(image error) Size: 15 KiB

Binary file not shown.

After

(image error) Size: 15 KiB

Binary file not shown.

After

(image error) Size: 20 KiB

Binary file not shown.

After

(image error) Size: 19 KiB

Binary file not shown.

After

(image error) Size: 11 KiB

Binary file not shown.

After

(image error) Size: 717 B

Binary file not shown.

After

(image error) Size: 716 B

Binary file not shown.

After

(image error) Size: 717 B

Binary file not shown.

After

(image error) Size: 712 B

View file

@ -0,0 +1,11 @@
{
"@context": "http://iiif.io/api/image/3/context.json",
"id": "http://localhost:8000/test/data/iiif_3_0_tiled_sf1",
"protocol": "http://iiif.io/api/image",
"height": 1024,
"width": 775,
"tiles" : [{"width": 256, "scaleFactors": [1]}],
"profile": "level2",
"extraQualities": ["bitonal", "grey", "color"],
"extraFormats": ["jpg", "png", "gif" ]
}

View file

@ -151,6 +151,20 @@
'}', assert);
});
QUnit.test('IIIF 3.0 JSON', function(assert) {
testOpenUrl('iiif_3_0_tiled/info.json', assert);
});
// ----------
QUnit.test('IIIF 3.0 JSON scaleFactors [1]', function(assert) {
testOpenUrl('iiif_3_0_tiled_sf1/info.json', assert);
});
// ----------
QUnit.test('IIIF 3.0 JSON, sizes array only', function(assert) {
testOpenUrl('iiif_3_0_sizes/info.json', assert);
});
// ----------
QUnit.test('ImageTileSource', function(assert) {
testOpen({

View file

@ -143,7 +143,9 @@
"profile": "level1"
};
QUnit.test('IIIFTileSource.configure determins correct version', function(assert) {
QUnit.module('IIIF');
QUnit.test('IIIFTileSource.configure determines correct version', function(assert) {
var options1_0xml = configure(infoXml10level0);
assert.ok(options1_0xml.version);
assert.equal(options1_0xml.version, 1, 'Version is 1 for version 1.0 info.xml');

View file

@ -26,6 +26,7 @@
<script src="/test/modules/basic.js"></script>
<script src="/test/modules/strings.js"></script>
<script src="/test/modules/formats.js"></script>
<script src="/test/modules/iiif.js"></script>
<script src="/test/modules/utils.js"></script>
<script src="/test/modules/events.js"></script>
<script src="/test/modules/units.js"></script>
@ -46,7 +47,6 @@
<script src="/test/modules/ajax-tiles.js"></script>
<script src="/test/modules/ajax-post-data.js"></script>
<script src="/test/modules/imageloader.js"></script>
<script src="/test/modules/iiif.js"></script>
<!--The navigator tests are the slowest (for now; hopefully they can be sped up)
so we put them last. -->
<script src="/test/modules/navigator.js"></script>