michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function runTests() { michael@0: let url = bgTestPageURL({ wait: 30000 }); michael@0: ok(!thumbnailExists(url), "Thumbnail should not be cached already."); michael@0: let numCalls = 0; michael@0: BackgroundPageThumbs.capture(url, { michael@0: timeout: 0, michael@0: onDone: function onDone(capturedURL) { michael@0: is(capturedURL, url, "Captured URL should be URL passed to capture"); michael@0: is(numCalls++, 0, "onDone should be called only once"); michael@0: ok(!thumbnailExists(url), michael@0: "Capture timed out so thumbnail should not be cached"); michael@0: next(); michael@0: }, michael@0: }); michael@0: yield true; michael@0: }