more test details logged

This commit is contained in:
Tom 2024-01-18 15:44:29 -05:00
parent aae82ab16a
commit 8271b6d8b2
2 changed files with 31 additions and 11 deletions

View File

@ -146,6 +146,19 @@
obj0[member0]();
assert.equal(called, true, 'called through 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;
}
}
};

View File

@ -22,17 +22,7 @@
},
afterEach: function () {
if (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;
}
Util.logWebGLInfo(viewer);
viewer.destroy();
}
@ -91,6 +81,10 @@
springStiffness: SPRING_STIFFNESS
};
if (viewer){
Util.logWebGLInfo(viewer);
viewer.destroy();
}
viewerConfig[config.property] = level;
viewer = OpenSeadragon(viewerConfig);
viewer.addOnceHandler('open', openHandler);
@ -107,6 +101,11 @@
};
viewerConfig[config.property] = level;
if (viewer){
Util.logWebGLInfo(viewer);
viewer.destroy();
}
viewer = OpenSeadragon(viewerConfig);
viewer.addOnceHandler('open', openHandler);
viewer.open(DZI_PATH);
@ -383,6 +382,10 @@
);
i++;
if (i < testZoomLevels.length) {
if (viewer){
Util.logWebGLInfo(viewer);
viewer.destroy();
}
viewer = OpenSeadragon({
id: VIEWER_ID,
prefixUrl: PREFIX_URL,
@ -396,6 +399,10 @@
done();
}
};
if (viewer){
Util.logWebGLInfo(viewer);
viewer.destroy();
}
viewer = OpenSeadragon({
id: VIEWER_ID,
prefixUrl: PREFIX_URL,