mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 14:16:10 +03:00
more test details logged
This commit is contained in:
parent
aae82ab16a
commit
8271b6d8b2
@ -146,6 +146,19 @@
|
|||||||
obj0[member0]();
|
obj0[member0]();
|
||||||
assert.equal(called, true, 'called through for ' + member0);
|
assert.equal(called, true, 'called through for ' + member0);
|
||||||
assert.equal(errored, true, 'errored for ' + member0);
|
assert.equal(errored, true, 'errored for ' + member0);
|
||||||
|
},
|
||||||
|
|
||||||
|
logWebGLInfo: function(viewer){
|
||||||
|
let drawers = [viewer.drawer, viewer.navigator && viewer.navigator.drawer];
|
||||||
|
for(const drawer of drawers){
|
||||||
|
if(!drawer){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let errors = drawer._numGlMaxTextureErrors;
|
||||||
|
let ok = drawer._numGlMaxTextureErrors;
|
||||||
|
errors === 0 ? console.log('No GL errors') : errors ? console.log(`GL errors: ${errors}`) : null;
|
||||||
|
ok === 0 ? console.log('No GL calls') : ok ? console.log(`GL calls: ${ok}`) : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,17 +22,7 @@
|
|||||||
},
|
},
|
||||||
afterEach: function () {
|
afterEach: function () {
|
||||||
if (viewer){
|
if (viewer){
|
||||||
let drawers = [viewer.drawer, viewer.navigator && viewer.navigator.drawer];
|
Util.logWebGLInfo(viewer);
|
||||||
for(const drawer of drawers){
|
|
||||||
if(!drawer){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let errors = drawer._numGlMaxTextureErrors;
|
|
||||||
let ok = drawer._numGlMaxTextureErrors;
|
|
||||||
errors === 0 ? console.log('No GL errors') : errors ? console.log(`GL errors: ${errors}`) : null;
|
|
||||||
ok === 0 ? console.log('No GL calls') : ok ? console.log(`GL calls: ${ok}`) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
viewer.destroy();
|
viewer.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,6 +81,10 @@
|
|||||||
springStiffness: SPRING_STIFFNESS
|
springStiffness: SPRING_STIFFNESS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (viewer){
|
||||||
|
Util.logWebGLInfo(viewer);
|
||||||
|
viewer.destroy();
|
||||||
|
}
|
||||||
viewerConfig[config.property] = level;
|
viewerConfig[config.property] = level;
|
||||||
viewer = OpenSeadragon(viewerConfig);
|
viewer = OpenSeadragon(viewerConfig);
|
||||||
viewer.addOnceHandler('open', openHandler);
|
viewer.addOnceHandler('open', openHandler);
|
||||||
@ -107,6 +101,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
viewerConfig[config.property] = level;
|
viewerConfig[config.property] = level;
|
||||||
|
|
||||||
|
if (viewer){
|
||||||
|
Util.logWebGLInfo(viewer);
|
||||||
|
viewer.destroy();
|
||||||
|
}
|
||||||
viewer = OpenSeadragon(viewerConfig);
|
viewer = OpenSeadragon(viewerConfig);
|
||||||
viewer.addOnceHandler('open', openHandler);
|
viewer.addOnceHandler('open', openHandler);
|
||||||
viewer.open(DZI_PATH);
|
viewer.open(DZI_PATH);
|
||||||
@ -383,6 +382,10 @@
|
|||||||
);
|
);
|
||||||
i++;
|
i++;
|
||||||
if (i < testZoomLevels.length) {
|
if (i < testZoomLevels.length) {
|
||||||
|
if (viewer){
|
||||||
|
Util.logWebGLInfo(viewer);
|
||||||
|
viewer.destroy();
|
||||||
|
}
|
||||||
viewer = OpenSeadragon({
|
viewer = OpenSeadragon({
|
||||||
id: VIEWER_ID,
|
id: VIEWER_ID,
|
||||||
prefixUrl: PREFIX_URL,
|
prefixUrl: PREFIX_URL,
|
||||||
@ -396,6 +399,10 @@
|
|||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (viewer){
|
||||||
|
Util.logWebGLInfo(viewer);
|
||||||
|
viewer.destroy();
|
||||||
|
}
|
||||||
viewer = OpenSeadragon({
|
viewer = OpenSeadragon({
|
||||||
id: VIEWER_ID,
|
id: VIEWER_ID,
|
||||||
prefixUrl: PREFIX_URL,
|
prefixUrl: PREFIX_URL,
|
||||||
|
Loading…
Reference in New Issue
Block a user