From 42060a49b542b74e71eddba88245419a256df0e5 Mon Sep 17 00:00:00 2001 From: "Mark Allen Matney, Jr" Date: Mon, 10 Sep 2018 00:58:24 -0700 Subject: [PATCH 1/2] Added HTML tests for ImageJob timeout --- test/demo/timeout-certain.html | 35 +++++++++++++++++++++++++++++++++ test/demo/timeout-unlikely.html | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 test/demo/timeout-certain.html create mode 100644 test/demo/timeout-unlikely.html diff --git a/test/demo/timeout-certain.html b/test/demo/timeout-certain.html new file mode 100644 index 00000000..9e177500 --- /dev/null +++ b/test/demo/timeout-certain.html @@ -0,0 +1,35 @@ + + + + OpenSeadragon Demo - Timeout Certain + + + + + +
+

The ImageLoader timeout is set to 0 ms, and the tile source is remote.

+

In any web browser on any network connection, OpenSeadragon should not load properly, and the browser console log should show tile loading errors.

+
+
+ + + diff --git a/test/demo/timeout-unlikely.html b/test/demo/timeout-unlikely.html new file mode 100644 index 00000000..284f4297 --- /dev/null +++ b/test/demo/timeout-unlikely.html @@ -0,0 +1,35 @@ + + + + OpenSeadragon Demo - Timeout Unlikely + + + + + +
+

The ImageLoader timeout is set to 24 hours, and the tile source is remote.

+

In any web browser on nearly any network connection, OpenSeadragon should load properly, and the browser console log should not show any tile loading errors.

+
+
+ + + From f94aa78cc68d335c8ee156874673f7679d787695 Mon Sep 17 00:00:00 2001 From: "Mark Allen Matney, Jr" Date: Mon, 10 Sep 2018 00:59:25 -0700 Subject: [PATCH 2/2] Improved ImageJob timeout error logging --- src/imageloader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageloader.js b/src/imageloader.js index 14eb576b..faa1fac8 100644 --- a/src/imageloader.js +++ b/src/imageloader.js @@ -84,7 +84,7 @@ ImageJob.prototype = { }; this.jobId = window.setTimeout(function(){ - self.errorMsg = "Image load exceeded timeout"; + self.errorMsg = "Image load exceeded timeout (" + self.timeout + " ms)"; self.finish(false); }, this.timeout);