michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: // the following tests attempt to display modal dialogs. The test just michael@0: // relies on the fact that if the dialog was displayed the test will hang michael@0: // and timeout. IOW - the tests would pass if the dialogs appear and are michael@0: // manually closed by the user - so don't do that :) (obviously there is michael@0: // noone available to do that when run via tbpl etc, so this should be safe, michael@0: // and it's tricky to use the window-watcher to check a window *does not* michael@0: // appear - how long should the watcher be active before assuming it's not michael@0: // going to appear?) michael@0: function runTests() { michael@0: let url = "http://mochi.test:8888/browser/browser/base/content/test/general/authenticate.sjs?user=anyone"; michael@0: ok(!thumbnailExists(url), "Thumbnail file should not already exist."); michael@0: michael@0: let capturedURL = yield bgCapture(url); michael@0: is(capturedURL, url, "Captured URL should be URL passed to capture."); michael@0: ok(thumbnailExists(url), michael@0: "Thumbnail file should exist even though it requires auth."); michael@0: removeThumbnail(url); michael@0: }