tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_update_checkForUpdates.js (553B)


      1 // Invoke the "Check for Updates" menu item
      2 function checkAll(win) {
      3  triggerPageOptionsAction(win, "check-for-updates");
      4  return new Promise(resolve => {
      5    let observer = {
      6      observe() {
      7        Services.obs.removeObserver(observer, "EM-update-check-finished");
      8        resolve();
      9      },
     10    };
     11    Services.obs.addObserver(observer, "EM-update-check-finished");
     12  });
     13 }
     14 
     15 // Test "Check for Updates" with both auto-update settings
     16 add_task(() => interactiveUpdateTest(true, checkAll));
     17 add_task(() => interactiveUpdateTest(false, checkAll));