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