toolkit/components/thumbnails/test/browser_thumbnails_bg_no_auth_prompt.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/ */
     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.");
    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 }

mercurial