Rewrite TiledImage closure functions to be private class members. Fix tests that expect error message to appear in 'log' instead of 'error'.

This commit is contained in:
Jirka 2022-03-23 14:05:58 +01:00
parent 68126a82dc
commit aa0119be45
3 changed files with 916 additions and 935 deletions

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@
assert.equal($(".openseadragon-message").length, 1, "Open failures should display a message");
assert.ok(testLog.log.contains('["AJAX request returned %d: %s",404,"/test/data/not-a-real-file"]'),
assert.ok(testLog.error.contains('["AJAX request returned %d: %s",404,"/test/data/not-a-real-file"]'),
"AJAX failures should be logged to the console");
done();

View File

@ -22,11 +22,11 @@
QUnit.test("getInvalidString", function(assert) {
assert.equal(OpenSeadragon.getString("Greeting"), "", "Handled unset string key");
assert.ok(testLog.log.contains('["Untranslated source string:","Greeting"]'),
assert.ok(testLog.error.contains('["Untranslated source string:","Greeting"]'),
'Invalid string keys are logged');
assert.equal(OpenSeadragon.getString("Errors"), "", "Handled requesting parent key");
assert.ok(testLog.log.contains('["Untranslated source string:","Errors"]'),
assert.ok(testLog.error.contains('["Untranslated source string:","Errors"]'),
'Invalid string parent keys are logged');
});