First version of real tests
1
test/data/testpattern.dzi
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><Image TileSize="254" Overlap="1" Format="jpg" xmlns="http://schemas.microsoft.com/deepzoom/2008"><Size Width="1000" Height="1000"/></Image>
|
BIN
test/data/testpattern_files/0/0_0.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
test/data/testpattern_files/1/0_0.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
test/data/testpattern_files/10/0_0.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
test/data/testpattern_files/10/0_1.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/0_2.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
test/data/testpattern_files/10/0_3.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/1_0.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/1_1.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/testpattern_files/10/1_2.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
test/data/testpattern_files/10/1_3.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/2_0.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
test/data/testpattern_files/10/2_1.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
test/data/testpattern_files/10/2_2.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
test/data/testpattern_files/10/2_3.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/3_0.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/3_1.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/3_2.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/testpattern_files/10/3_3.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/testpattern_files/2/0_0.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
test/data/testpattern_files/3/0_0.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
test/data/testpattern_files/4/0_0.jpg
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
test/data/testpattern_files/5/0_0.jpg
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
test/data/testpattern_files/6/0_0.jpg
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
test/data/testpattern_files/7/0_0.jpg
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
test/data/testpattern_files/8/0_0.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
test/data/testpattern_files/9/0_0.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
test/data/testpattern_files/9/0_1.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
test/data/testpattern_files/9/1_0.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
test/data/testpattern_files/9/1_1.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
5
test/lib/jquery-1.9.1.min.js
vendored
Normal file
@ -11,6 +11,7 @@
|
|||||||
<div id="qunit-fixture"></div>
|
<div id="qunit-fixture"></div>
|
||||||
<div id="example"></div>
|
<div id="example"></div>
|
||||||
<script src="/node_modules/grunt-contrib-qunit/test/libs/qunit.js"></script>
|
<script src="/node_modules/grunt-contrib-qunit/test/libs/qunit.js"></script>
|
||||||
|
<script src="/test/lib/jquery-1.9.1.min.js"></script>
|
||||||
<script src="/build/openseadragon/openseadragon.min.js"></script>
|
<script src="/build/openseadragon/openseadragon.min.js"></script>
|
||||||
<script src="/test/test.js"></script>
|
<script src="/test/test.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
30
test/test.js
@ -1,16 +1,22 @@
|
|||||||
test( "hello test", function() {
|
|
||||||
ok( 1 == "1", "Passed!" );
|
|
||||||
});
|
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
// $(document).ready(function() {
|
asyncTest('OpenSeadragon', function() {
|
||||||
// OpenSeadragon({
|
$(document).ready(function() {
|
||||||
// id: "example",
|
var viewer = OpenSeadragon({
|
||||||
// prefixUrl: "/images/",
|
id: 'example',
|
||||||
// tileSources: "/test/dzi/dog-and-cat-collars.xml",
|
prefixUrl: '/build/openseadragon/images/',
|
||||||
// showNavigator: true
|
tileSources: '/test/data/testpattern.dzi',
|
||||||
// });
|
showNavigator: true
|
||||||
// });
|
});
|
||||||
|
|
||||||
|
ok(viewer, 'Viewer exists');
|
||||||
|
viewer.addHandler('open', function(eventSender, eventData) {
|
||||||
|
ok(true, 'Open event was sent');
|
||||||
|
ok(eventSender === viewer, 'Sender of open event was viewer');
|
||||||
|
ok(eventData, 'Handler also received event data');
|
||||||
|
start();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|