B2G/gecko/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
// Tests that InstallTrigger deals with relative urls correctly.
Tests that InstallTrigger deals with relative urls correctly.
Tests that InstallTrigger deals with relative urls correctly .
function test() {
  Harness.installConfirmCallback = confirm_install;
  Harness.installEndedCallback = install_ended;
  Harness.installsCompletedCallback = finish_test;
  Harness.setup();
  var pm = Services.perms;
  pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
  var triggers = encodeURIComponent(JSON.stringify({
    "Unsigned XPI": {
      URL: "unsigned.xpi",
      IconURL: "icon.png",
      toString: function() { return this.URL; }
    }
  }));
  gBrowser.selectedTab = gBrowser.addTab();
  gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
}
function test ( ) { Harness . installConfirmCallback = confirm_install ; Harness . installEndedCallback = install_ended ; Harness . installsCompletedCallback = finish_test ; Harness . setup ( ) ; var pm = Services . perms ; pm . add ( makeURI ( "http://example.com/" ) , "install" , pm . ALLOW_ACTION ) ; var triggers = encodeURIComponent ( JSON . stringify ( { "Unsigned XPI" : { URL : "unsigned.xpi" , IconURL : "icon.png" , toString : function ( ) { return this . URL ; } } } ) ) ; gBrowser . selectedTab = gBrowser . addTab ( ) ; gBrowser . loadURI ( TESTROOT + "installtrigger.html?" + triggers ) ; }
Tests that InstallTrigger deals with relative urls correctly.
Tests that InstallTrigger deals with relative urls correctly .