toolkit/mozapps/update/tests/unit_service_updater/bootstrapSvc.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/
     3  */
     5 /* Bootstrap the tests using the service by installing our own version of the service */
     7 function run_test() {
     8   if (!shouldRunServiceTest(true)) {
     9     return;
    10   }
    12   setupTestCommon();
    13   // We don't actually care if the MAR has any data, we only care about the
    14   // application return code and update.status result.
    15   gTestFiles = gTestFilesCommon;
    16   gTestDirs = [];
    17   setupUpdaterTest(FILE_COMPLETE_MAR, false, false);
    19   setupAppFilesAsync();
    20 }
    22 function setupAppFilesFinished() {
    23   runUpdateUsingService(STATE_PENDING_SVC, STATE_SUCCEEDED, false);
    24 }
    26 function checkUpdateFinished() {
    27   checkFilesAfterUpdateSuccess();
    29   // We need to check the service log even though this is a bootstrap
    30   // because the app bin could be in use by this test by the time the next
    31   // test runs.
    32   checkCallbackServiceLog();
    33 }

mercurial