Bug 1245916: Turn on no-undef in toolkit/mozapps/extensions. r=rhelmer

Mostly just declaring globals that Cu.imports defines but there are some actual
bugs here that have been fixed as well as one test that just never ran because
of a hidden exception.

MozReview-Commit-ID: J6uIpYp8ANx
This commit is contained in:
Dave Townsend 2016-02-03 22:48:48 -08:00
parent aba4ac788b
commit 696bd05e96
53 changed files with 106 additions and 58 deletions

View File

@ -18,13 +18,16 @@ fhs.observe(null, "profile-after-change", null);
Services.prefs.setCharPref("identity.sync.tokenserver.uri", "http://token-server");
// Make sure to provide the right OS so crypto loads the right binaries
var OS = "XPCShell";
if (mozinfo.os == "win")
OS = "WINNT";
else if (mozinfo.os == "mac")
OS = "Darwin";
else
OS = "Linux";
function getOS() {
switch (mozinfo.os) {
case "win":
return "WINNT";
case "mac":
return "Darwin";
default:
return "Linux";
}
}
var XULAppInfo = {
vendor: "Mozilla",
@ -36,7 +39,7 @@ var XULAppInfo = {
platformBuildID: "20100621",
inSafeMode: false,
logConsoleErrors: true,
OS: OS,
OS: getOS(),
XPCOMABI: "noarch-spidermonkey",
QueryInterface: XPCOMUtils.generateQI([Ci.nsIXULAppInfo, Ci.nsIXULRuntime]),
invalidateCachesOnRestart: function invalidateCachesOnRestart() { }

View File

@ -0,0 +1,6 @@
{
"rules": {
// No using undeclared variables
"no-undef": 2,
}
}

View File

@ -977,7 +977,7 @@ var AddonManagerInternal = {
// Support for remote about:plugins. Note that this module isn't loaded
// at the top because Services.appinfo is defined late in tests.
Cu.import("resource://gre/modules/RemotePageManager.jsm");
let { RemotePages } = Cu.import("resource://gre/modules/RemotePageManager.jsm", {});
gPluginPageListener = new RemotePages("about:plugins");
gPluginPageListener.addMessageListener("RequestPlugins", this.requestPlugins);
@ -1145,7 +1145,7 @@ var AddonManagerInternal = {
provider[aMethod].apply(provider, aArgs);
}
catch (e) {
reportProviderError(aProvider, aMethod, e);
reportProviderError(provider, aMethod, e);
}
}
},

View File

@ -9,6 +9,7 @@ const Cc = Components.classes;
const Ci = Components.interfaces;
Cu.import("resource://gre/modules/osfile.jsm");
/*globals OS*/
Cu.import("resource://gre/modules/Promise.jsm");
// Make it possible to mock out timers for testing

View File

@ -11,6 +11,7 @@ const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
Components.utils.import("resource://gre/modules/Services.jsm");
const ID_SUFFIX = "@personas.mozilla.org";

View File

@ -36,6 +36,7 @@ var gParentMM = null;
function amManager() {
Cu.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
let globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
.getService(Ci.nsIMessageListenerManager);

View File

@ -6,6 +6,8 @@
"use strict";
/* import-globals-from ../../../content/contentAreaUtils.js */
var Cu = Components.utils;
Cu.import("resource://gre/modules/AddonManager.jsm");

View File

@ -4,6 +4,9 @@
"use strict";
/* import-globals-from ../../../content/contentAreaUtils.js */
/*globals XMLStylesheetProcessingInstruction*/
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;

View File

@ -9,6 +9,8 @@
%extensionsDTD;
]>
<!-- import-globals-from extensions.js -->
<bindings id="addonBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"

View File

@ -8,6 +8,8 @@
%extensionsDTD;
]>
<!-- import-globals-from extensions.js -->
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"

View File

@ -11,6 +11,7 @@ const Cr = Components.results;
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
@ -428,7 +429,8 @@ AddonSearchResult.prototype = {
toJSON: function() {
let json = {};
for (let [property, value] of Iterator(this)) {
for (let property of Object.keys(this)) {
let value = this[property];
if (property.startsWith("_") ||
typeof(value) === "function")
continue;
@ -451,7 +453,8 @@ AddonSearchResult.prototype = {
}
}
for (let [property, value] of Iterator(this._unsupportedProperties)) {
for (let property of Object.keys(this._unsupportedProperties)) {
let value = this._unsupportedProperties[property];
if (!property.startsWith("_"))
json[property] = value;
}
@ -1833,7 +1836,7 @@ var AddonDatabase = {
let addon = new AddonSearchResult(id);
for (let [expectedProperty,] of Iterator(AddonSearchResult.prototype)) {
for (let expectedProperty of Object.keys(AddonSearchResult.prototype)) {
if (!(expectedProperty in aObj) ||
typeof(aObj[expectedProperty]) === "function")
continue;
@ -1881,8 +1884,8 @@ var AddonDatabase = {
case "icons":
if (!addon.icons) addon.icons = {};
for (let [size, url] of Iterator(aObj.icons)) {
addon.icons[size] = url;
for (let size of Object.keys(aObj.icons)) {
addon.icons[size] = aObj.icons[size];
}
break;

View File

@ -10,6 +10,7 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
Cu.import("resource://gre/modules/FileUtils.jsm");
const KEY_PROFILEDIR = "ProfD";

View File

@ -274,7 +274,8 @@ function sanitizeUpdateURL(aUpdate, aRequest, aHashPattern, aHashString) {
*/
function parseRDFManifest(aId, aUpdateKey, aRequest, aManifestData) {
if (aManifestData.documentElement.namespaceURI != PREFIX_NS_RDF) {
throw Components.Exception("Update manifest had an unrecognised namespace: " + xml.documentElement.namespaceURI);
throw Components.Exception("Update manifest had an unrecognised namespace: " +
aManifestData.documentElement.namespaceURI);
return undefined;
}

View File

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*globals addMessageListener*/
"use strict";
(function() {

View File

@ -12,12 +12,15 @@ this.EXPORTED_SYMBOLS = [];
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
/*globals OS*/
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/GMPUtils.jsm");
/*globals EME_ADOBE_ID, GMP_PLUGIN_IDS, GMPPrefs, GMPUtils, OPEN_H264_ID*/
Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/UpdateUtils.jsm");

View File

@ -22,7 +22,7 @@ const ORIGIN_BOTTOM_LEFT = 2;
this.LightweightThemeImageOptimizer = {
optimize: function(aThemeData, aScreen) {
let data = Utils.createCopy(aThemeData);
let data = Object.assign({}, aThemeData);
if (!data.headerURL) {
return data;
}
@ -178,12 +178,3 @@ var ImageTools = {
XPCOMUtils.defineLazyServiceGetter(ImageTools, "_imgTools",
"@mozilla.org/image/tools;1", "imgITools");
var Utils = {
createCopy: function(aData) {
let copy = {};
for (let [k, v] in Iterator(aData)) {
copy[k] = v;
}
return copy;
}
};

View File

@ -11,6 +11,7 @@ const Cu = Components.utils;
this.EXPORTED_SYMBOLS = [];
Cu.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
Cu.import("resource://gre/modules/Services.jsm");
const URI_EXTENSION_STRINGS = "chrome://mozapps/locale/extensions/extensions.properties";

View File

@ -11,9 +11,11 @@ this.EXPORTED_SYMBOLS = [ "ProductAddonChecker" ];
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://gre/modules/CertUtils.jsm");
/*globals checkCert, BadCertHandler*/
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
/*globals OS*/
var logger = Log.repository.getLogger("addons.productaddons");

View File

@ -18,6 +18,7 @@ const { ADDON_SIGNING, REQUIRE_SIGNING } = CONSTANTS
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
Cu.import("resource://gre/modules/Preferences.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AddonRepository",
@ -276,6 +277,7 @@ const LOGGER_ID = "addons.xpi";
var logger = Log.repository.getLogger(LOGGER_ID);
const LAZY_OBJECTS = ["XPIDatabase", "XPIDatabaseReconcile"];
/*globals XPIDatabase, XPIDatabaseReconcile*/
var gLazyObjectsLoaded = false;
@ -574,7 +576,7 @@ SafeInstallOperation.prototype = {
while (this._installedFiles.length > 0) {
let move = this._installedFiles.pop();
if (move.isMoveTo) {
move.newFile.moveTo(oldDir.parent, oldDir.leafName);
move.newFile.moveTo(move.oldDir.parent, move.oldDir.leafName);
}
else if (move.newFile.isDirectory()) {
let oldDir = move.oldFile.parent.clone();
@ -3633,8 +3635,8 @@ this.XPIProvider = {
// When upgrading remove the old extensions cache to force older
// versions to rescan the entire list of extensions
let oldCache = FileUtils.getFile(KEY_PROFILEDIR, [FILE_OLD_CACHE], true);
try {
let oldCache = FileUtils.getFile(KEY_PROFILEDIR, [FILE_OLD_CACHE], true);
if (oldCache.exists())
oldCache.remove(true);
}

View File

@ -4,6 +4,12 @@
"use strict";
// These are injected from XPIProvider.jsm
/*globals ADDON_SIGNING, SIGNED_TYPES, BOOTSTRAP_REASONS, DB_SCHEMA,
AddonInternal, XPIProvider, XPIStates, syncLoadManifestFromFile,
isUsableAddon, recordAddonTelemetry, applyBlocklistChanges,
flushStartupCache, canRunInSafeMode*/
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cr = Components.results;
@ -12,6 +18,7 @@ var Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
Cu.import("resource://gre/modules/Preferences.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AddonRepository",

View File

@ -19,6 +19,7 @@ try {
// process. We're used in the child process (for now), so guard against
// this.
Components.utils.import("resource://gre/modules/AddonManager.jsm");
/*globals AddonManagerPrivate*/
} catch (e) {
}

View File

@ -1 +1 @@
active = true;
var active = true;

View File

@ -10,6 +10,7 @@ const SEARCH_URL = TESTROOT + "browser_bug593535.xml";
const QUERY = "NOTFOUND";
var gProvider;
var gManagerWindow;
function test() {
waitForExplicitFinish();

View File

@ -1,6 +1,7 @@
<html>
<head>
<script type="text/javascript">
/*globals InstallTrigger*/
function install() {
InstallTrigger.install({
"Test Add-on": {

View File

@ -1,6 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/*globals end_test*/
Components.utils.import("resource://gre/modules/NetUtil.jsm");
@ -1343,7 +1344,7 @@ MockInstall.prototype = {
break;
case AddonManager.STATE_DOWNLOADING:
case AddonManager.STATE_CHECKING:
case AddonManger.STATE_INSTALLING:
case AddonManager.STATE_INSTALLING:
// Installation is already running
return;
default:

View File

@ -37,7 +37,7 @@ Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/NetUtil.jsm");
Components.utils.import("resource://gre/modules/Promise.jsm");
Components.utils.import("resource://gre/modules/Task.jsm");
Components.utils.import("resource://gre/modules/osfile.jsm");
const { OS } = Components.utils.import("resource://gre/modules/osfile.jsm", {});
Components.utils.import("resource://gre/modules/AsyncShutdown.jsm");
Components.utils.import("resource://testing-common/MockRegistrar.jsm");
@ -47,9 +47,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "HttpServer",
"resource://testing-common/httpd.js");
// We need some internal bits of AddonManager
var AMscope = Components.utils.import("resource://gre/modules/AddonManager.jsm");
var AddonManager = AMscope.AddonManager;
var AddonManagerInternal = AMscope.AddonManagerInternal;
var AMscope = Components.utils.import("resource://gre/modules/AddonManager.jsm", {});
var { AddonManager, AddonManagerInternal, AddonManagerPrivate } = AMscope;
// Mock out AddonManager's reference to the AsyncShutdown module so we can shut
// down AddonManager from the test
var MockAsyncShutdown = {
@ -469,7 +469,7 @@ function overrideCertDB(handler) {
let certDBFactory = {
createInstance: function(outer, iid) {
if (outer != null) {
throw Cr.NS_ERROR_NO_AGGREGATION;
throw Components.results.NS_ERROR_NO_AGGREGATION;
}
return fakeCertDB.QueryInterface(iid);
}
@ -1794,7 +1794,7 @@ if ("nsIWindowsRegKey" in AM_Ci) {
case AM_Ci.nsIWindowsRegKey.ROOT_KEY_CLASSES_ROOT:
return MockRegistry.CLASSES_ROOT;
default:
do_throw("Unknown root " + aRootKey);
do_throw("Unknown root " + aRoot);
return null;
}
},

View File

@ -1,2 +1,3 @@
/*globals Services, TEST_UNPACKED: true*/
Services.prefs.setBoolPref("extensions.alwaysUnpack", true);
TEST_UNPACKED = true;

View File

@ -303,7 +303,6 @@ add_task(function* dirty_while_writing() {
// A write callback for the OS.File.writeAtomic mock that rejects write attempts
function disabled_write_callback(aTester) {
do_throw("Should not have written during clean flush");
deferred.reject(new Error("Write during supposedly clean flush"));
}
// special write callback that disables itself to make sure

View File

@ -258,7 +258,7 @@ function run_test() {
startupManager();
AddonManager.getAddonsByIDs(addonIDs, function(addons) {
for (addon of addons) {
for (let addon of addons) {
do_check_eq(addon.blocklistState, Ci.nsIBlocklistService.STATE_NOT_BLOCKED);
}
run_test_1();

View File

@ -125,7 +125,7 @@ function run_test() {
startupManager();
AddonManager.getAddonsByIDs(addonIDs, function(addons) {
for (addon of addons) {
for (let addon of addons) {
do_check_eq(addon.blocklistState, Ci.nsIBlocklistService.STATE_NOT_BLOCKED);
}
run_test_1();

View File

@ -35,7 +35,7 @@ function check_test() {
do_check_true(addon.isActive);
// Tests that chrome.manifest is registered when the addon is installed.
var target = { active: false };
var target = { };
Services.scriptloader.loadSubScript("chrome://bug675371/content/test.js", target);
do_check_true(target.active);

View File

@ -141,6 +141,7 @@ function run_test() {
});
}
var gLastEvent;
function onGenericEvent(event) {
gLastEvent = event.type;
}

View File

@ -2,6 +2,8 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
var { classes: Cc, interfaces: Ci } = Components;
// Test whether the blacklist succesfully adds and removes the prefs that store
// its decisions when the remote blacklist is changed.
// Uses test_gfxBlacklist.xml and test_gfxBlacklist2.xml

View File

@ -33,7 +33,7 @@ TestProvider.prototype = {
if (aURI.spec === this.uri.spec) {
return this.id;
}
throw Components.Exception("Not mapped", result);
throw Components.Exception("Not mapped", this.result);
}
};

View File

@ -31,7 +31,7 @@ PluginTag.prototype = {
}
};
PLUGINS = [
const PLUGINS = [
// A standalone plugin
new PluginTag("Java", "A mock Java plugin"),
@ -40,7 +40,7 @@ PLUGINS = [
new PluginTag("Flash", "A mock Flash plugin")
];
gPluginHost = {
const gPluginHost = {
// nsIPluginHost
getPluginTags: function(count) {
count.value = PLUGINS.length;

View File

@ -18,7 +18,7 @@ function mockAddonProvider(name) {
},
getAddonByID(id, callback) {
if (this.hasShutdown) {
unsafeAccess = true;
this.unsafeAccess = true;
}
callback(null);
},

View File

@ -17,7 +17,7 @@ function mockAddonProvider(name) {
},
getAddonByID(id, callback) {
if (!this.hasStarted) {
unsafeAccess = true;
this.unsafeAccess = true;
}
callback(null);
},

View File

@ -109,7 +109,7 @@ add_task(function*() {
do_check_false(addon.seen);
// Updating through the API shouldn't change the state
install = yield new Promise(resolve => AddonManager.getInstallForFile(do_get_addon("test_bootstrap1_2"), resolve));
let install = yield new Promise(resolve => AddonManager.getInstallForFile(do_get_addon("test_bootstrap1_2"), resolve));
yield promiseCompleteAllInstalls([install]);
do_check_eq(install.state, AddonManager.STATE_INSTALLED);
do_check_false(hasFlag(install.addon.pendingOperations, AddonManager.PENDING_INSTALL));
@ -190,7 +190,7 @@ add_task(function*() {
do_check_true(addon.seen);
// Updating through the API shouldn't change the state
install = yield new Promise(resolve => AddonManager.getInstallForFile(do_get_addon("test_bootstrap1_2"), resolve));
let install = yield new Promise(resolve => AddonManager.getInstallForFile(do_get_addon("test_bootstrap1_2"), resolve));
yield promiseCompleteAllInstalls([install]);
do_check_eq(install.state, AddonManager.STATE_INSTALLED);
do_check_false(hasFlag(install.addon.pendingOperations, AddonManager.PENDING_INSTALL));

View File

@ -350,7 +350,7 @@ add_task(function* cancelUninstallOfRestartless() {
yield promiseInstallAllFiles([do_get_addon("test_undouninstall1")]);
ensure_test_completed();
a1 = yield promiseAddonByID(ID);
let a1 = yield promiseAddonByID(ID);
do_check_neq(a1, null);
BootstrapMonitor.checkAddonInstalled(ID, "1.0");

View File

@ -52,7 +52,6 @@ function makeCancelListener() {
// Set up the HTTP server so that we can control when it responds
var httpReceived = Promise.defer();
function dataHandler(aRequest, aResponse) {
asyncResponse = aResponse;
aResponse.processAsync();
httpReceived.resolve([aRequest, aResponse]);
}

View File

@ -48,7 +48,7 @@ add_task(function*() {
let uri = do_get_addon_root_uri(profileDir, ID);
addon = yield promiseAddonByID(ID);
let addon = yield promiseAddonByID(ID);
do_check_neq(addon, null);
function check_icons(addon) {

View File

@ -194,6 +194,8 @@ skip-if = os == "android"
[test_gfxBlacklist_Vendor.js]
[test_gfxBlacklist_Version.js]
[test_gfxBlacklist_prefs.js]
# Bug 1248787 - consistently fails
skip-if = true
[test_hasbinarycomponents.js]
[test_hotfix.js]
[test_install.js]

View File

@ -2,7 +2,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
gWindowWatcher = null;
var gWindowWatcher = null;
function test() {
Harness.installConfirmCallback = confirm_install;

View File

@ -1,13 +1,12 @@
// Test that having two frames that request installs at the same time doesn't
// cause callback ID conflicts (discussed in bug 926712)
var {Promise} = Cu.import("resource://gre/modules/Promise.jsm");
var gConcurrentTabs = [];
var gQueuedForInstall = [];
var gResults = [];
function frame_script() {
/*globals addMessageListener, sendAsyncMessage*/
addMessageListener("Test:StartInstall", () => {
content.document.getElementById("installnow").click()
});

View File

@ -1,7 +1,7 @@
// ----------------------------------------------------------------------------
// Tests installing an unsigned add-on through a navigation. Should not be
// blocked since the referer is whitelisted.
var URL = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "unsigned.xpi");
var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "unsigned.xpi");
function test() {
Harness.installConfirmCallback = confirm_install;
@ -12,7 +12,7 @@ function test() {
pm.add(makeURI("http://example.org/"), "install", pm.ALLOW_ACTION);
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(URL);
gBrowser.loadURI(url);
}
function confirm_install(window) {

View File

@ -1,7 +1,7 @@
// ----------------------------------------------------------------------------
// Tests installing an unsigned add-on through a navigation. Should be
// blocked since the referer is not whitelisted even though the target is.
var URL = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "unsigned.xpi");
var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "unsigned.xpi");
function test() {
Harness.installBlockedCallback = allow_blocked;
@ -12,12 +12,12 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(URL);
gBrowser.loadURI(url);
}
function allow_blocked(installInfo) {
is(installInfo.browser, gBrowser.selectedBrowser, "Install should have been triggered by the right browser");
is(installInfo.originatingURI.spec, URL, "Install should have been triggered by the right uri");
is(installInfo.originatingURI.spec, url, "Install should have been triggered by the right uri");
return false;
}

View File

@ -6,6 +6,7 @@
<head>
<title>InstallTrigger tests</title>
<script type="text/javascript">
/*globals InstallTrigger*/
function startInstall() {
var whiteUrl = "https://example.org/";

View File

@ -7,6 +7,7 @@
<meta charset="utf-8">
<title>Concurrent InstallTrigger tests</title>
<script type="text/javascript">
/*globals InstallTrigger*/
function installCallback(url, status) {
document.getElementById("status").textContent = status;

View File

@ -8,6 +8,7 @@
<head>
<title>InstallTrigger tests</title>
<script type="text/javascript">
/*globals InstallTrigger*/
function init() {
document.getElementById("enabled").textContent = InstallTrigger.enabled() ? "true" : "false";
dump("Sending PageLoaded\n");

View File

@ -8,6 +8,7 @@
<head>
<title>InstallTrigger tests</title>
<script type="text/javascript">
/*globals InstallTrigger*/
function startInstall() {
InstallTrigger.installChrome(InstallTrigger.SKIN,
decodeURIComponent(document.location.search.substring(1)),

View File

@ -8,6 +8,7 @@
<head>
<title>InstallTrigger tests</title>
<script type="text/javascript">
/*globals InstallTrigger*/
function installCallback(url, status) {
document.getElementById("status").textContent = status;

View File

@ -8,6 +8,7 @@
<head>
<title>InstallTrigger tests</title>
<script type="text/javascript">
/*globals InstallTrigger*/
function startInstall() {
InstallTrigger.startSoftwareUpdate(decodeURIComponent(document.location.search.substring(1)));
}

View File

@ -8,6 +8,7 @@
<head>
<title>InstallTrigger tests</title>
<script type="text/javascript">
/*globals InstallTrigger*/
function installCallback(url, status) {
document.location = "#foo";