No bug - fix some browser chrome tests that pollute the global scope

This commit is contained in:
Dão Gottwald 2012-01-20 16:21:46 +01:00
Родитель 5559273159
Коммит fcb73495b2
8 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -43,7 +43,8 @@ function test() {
}
function afterZoomAndLoad(cb) {
let didLoad = didZoom = false;
let didLoad = false;
let didZoom = false;
tabElm.linkedBrowser.addEventListener("load", function() {
tabElm.linkedBrowser.removeEventListener("load", arguments.callee, true);
didLoad = true;

Просмотреть файл

@ -37,7 +37,8 @@ const TEST_PAGE = "/browser/browser/base/content/test/dummy_page.html";
var gTestTab, gBgTab, gTestZoom;
function afterZoomAndLoad(aCallback, aTab) {
let didLoad = didZoom = false;
let didLoad = false;
let didZoom = false;
aTab.linkedBrowser.addEventListener("load", function() {
aTab.linkedBrowser.removeEventListener("load", arguments.callee, true);
didLoad = true;

Просмотреть файл

@ -4,7 +4,9 @@
const TESTROOT = "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/";
Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm");
var tempScope = {};
Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", tempScope);
var LightweightThemeManager = tempScope.LightweightThemeManager;
function wait_for_notification(aCallback) {
PopupNotifications.panel.addEventListener("popupshown", function() {

Просмотреть файл

@ -43,6 +43,8 @@ https://example.com/browser/browser/base/content/test/redirect_bug623155.sjs#FG
*/
var gNewTab;
function test() {
waitForExplicitFinish();

Просмотреть файл

@ -383,7 +383,7 @@ function test_latchedGesture(gesture, inc, dec, eventPrefix)
// Restore the gesture to its original configuration.
gPrefService.setBoolPref(branch + "latched", oldLatchedValue);
for (dir in cmd)
for (let dir in cmd)
test_removeCommand(cmd[dir]);
}

Просмотреть файл

@ -68,7 +68,7 @@ var tests = [
},
]
let gCurrentTest, gCurrentTestIndex = -1;
let gCurrentTest, gCurrentTestIndex = -1, gTestDesc;
// Go through the tests in both directions, to add additional coverage for
// transitions between different states.
let gForward = true;

Просмотреть файл

@ -611,7 +611,7 @@ SimpleTest.waitForClipboard = function(aExpectedStringOrValidatorFn, aSetupFn,
return;
}
data = SpecialPowers.getClipboardData(flavor);
var data = SpecialPowers.getClipboardData(flavor);
if (validatorFn(data)) {
// Don't show the success message when waiting for preExpectedVal

Просмотреть файл

@ -934,7 +934,7 @@ SpecialPowersAPI.prototype = {
// :jdm gets credit for this. ex: getPrivilegedProps(window, 'location.href');
getPrivilegedProps: function(obj, props) {
parts = props.split('.');
var parts = props.split('.');
for (var i = 0; i < parts.length; i++) {
var p = parts[i];