third_party/js/mozmill/shared-modules/software-update.js
function softwareUpdate_openDialog(browserController) {
    // XXX: After Firefox 4 has been released and we do not have to test any
    // beta release anymore uncomment out the following code

    // With version >= 4.0b7pre the update dialog is reachable from within the
    // about window now.
    var appVersion = utils.appInfo.version;

    if (this._vc.compare(appVersion, "4.0b7pre") >= 0) {
      // XXX: We can't open the about window, otherwise a parallel download of
      // the update will let us fallback to a complete one all the time

      // Open the about window and check the update button
      //var aboutItem = new elementslib.Elem(browserController.menus.helpMenu.aboutName);
      //browserController.click(aboutItem);
      //
      //utils.handleWindow("type", "Browser:About", function(controller) {
      //  // XXX: Bug 599290 - Check for updates has been completely relocated
      //  // into the about window. We can't check the in-about ui yet.
      //  var updateButton = new elementslib.ID(controller.window.document,
      //                                        "checkForUpdatesButton");
      //  //controller.click(updateButton);
      //  controller.waitForElement(updateButton, gTimeout);
      //});

      // For now just call the old ui until we have support for the about window.
      var updatePrompt = Cc["@mozilla.org/updates/update-prompt;1"].
                         createInstance(Ci.nsIUpdatePrompt);
      updatePrompt.checkForUpdates();
    } else {
      // For builds <4.0b7pre
      updateItem = new elementslib.Elem(browserController.menus.helpMenu.checkForUpdates);
      browserController.click(updateItem);
    }

    this.waitForDialogOpen(browserController);
  }
function softwareUpdate_openDialog(browserController) {
    // XXX: After Firefox 4 has been released and we do not have to test any
    // beta release anymore uncomment out the following code

    // With version >= 4.0b7pre the update dialog is reachable from within the
    // about window now.
    var appVersion = utils.appInfo.version;

    if (this._vc.compare(appVersion, "4.0b7pre") >= 0) {
      // XXX: We can't open the about window, otherwise a parallel download of
      // the update will let us fallback to a complete one all the time

      // Open the about window and check the update button
      //var aboutItem = new elementslib.Elem(browserController.menus.helpMenu.aboutName);
      //browserController.click(aboutItem);
      //
      //utils.handleWindow("type", "Browser:About", function(controller) {
      //  // XXX: Bug 599290 - Check for updates has been completely relocated
      //  // into the about window. We can't check the in-about ui yet.
      //  var updateButton = new elementslib.ID(controller.window.document,
      //                                        "checkForUpdatesButton");
      //  //controller.click(updateButton);
      //  controller.waitForElement(updateButton, gTimeout);
      //});

      // For now just call the old ui until we have support for the about window.
      var updatePrompt = Cc["@mozilla.org/updates/update-prompt;1"].
                         createInstance(Ci.nsIUpdatePrompt);
      updatePrompt.checkForUpdates();
    } else {
      // For builds <4.0b7pre
      updateItem = new elementslib.Elem(browserController.menus.helpMenu.checkForUpdates);
      browserController.click(updateItem);
    }

    this.waitForDialogOpen(browserController);
  }
function softwareUpdate_openDialog ( browserController ) { // XXX: After Firefox 4 has been released and we do not have to test any // beta release anymore uncomment out the following code // With version >= 4.0b7pre the update dialog is reachable from within the // about window now. var appVersion = utils . appInfo . version ; if ( this . _vc . compare ( appVersion , "4.0b7pre" ) >= 0 ) { // XXX: We can't open the about window, otherwise a parallel download of // the update will let us fallback to a complete one all the time // Open the about window and check the update button //var aboutItem = new elementslib.Elem(browserController.menus.helpMenu.aboutName); //browserController.click(aboutItem); // //utils.handleWindow("type", "Browser:About", function(controller) { //  // XXX: Bug 599290 - Check for updates has been completely relocated //  // into the about window. We can't check the in-about ui yet. //  var updateButton = new elementslib.ID(controller.window.document, //                                        "checkForUpdatesButton"); //  //controller.click(updateButton); //  controller.waitForElement(updateButton, gTimeout); //}); // For now just call the old ui until we have support for the about window. var updatePrompt = Cc [ "@mozilla.org/updates/update-prompt;1" ] . createInstance ( Ci . nsIUpdatePrompt ) ; updatePrompt . checkForUpdates ( ) ; } else { // For builds <4.0b7pre updateItem = new elementslib . Elem ( browserController . menus . helpMenu . checkForUpdates ) ; browserController . click ( updateItem ) ; } this . waitForDialogOpen ( browserController ) ; }
Open software update dialog

@param {MozMillController} browserController
Mozmill controller of the browser window
Open software update dialog