mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Make SimpleTest.js runnable in non-Gecko browsers again. No bug, r=jmaher over IRC
--HG-- rename : browser/themes/gnomestripe/downloads/allDownloadsViewOverlay.css => browser/themes/gnomestripe/downloads/downloads.css rename : browser/themes/winstripe/downloads/allDownloadsViewOverlay.css => browser/themes/winstripe/downloads/downloads.css rename : toolkit/components/places/tests/mochitest/test_bug_461710_perwindowpb.html => toolkit/components/places/tests/mochitest/test_bug_461710.html extra : rebase_source : a0c2241ee37c74d1df60cccc02b3b08fb7c68f58
This commit is contained in:
parent
690f70ba61
commit
156aca9f59
@ -286,8 +286,10 @@ SimpleTest._logResult = function(test, passString, failString) {
|
||||
} else {
|
||||
parentRunner.log(msg);
|
||||
}
|
||||
} else {
|
||||
} else if (typeof dump === "function") {
|
||||
dump(msg + "\n");
|
||||
} else {
|
||||
// Non-Mozilla browser? Just do nothing.
|
||||
}
|
||||
};
|
||||
|
||||
@ -600,7 +602,7 @@ SimpleTest.waitForClipboard = function(aExpectedStringOrValidatorFn, aSetupFn,
|
||||
|
||||
// Build a default validator function for common string input.
|
||||
var inputValidatorFn = typeof(aExpectedStringOrValidatorFn) == "string"
|
||||
? function(aData) aData == aExpectedStringOrValidatorFn
|
||||
? function(aData) { return aData == aExpectedStringOrValidatorFn; }
|
||||
: aExpectedStringOrValidatorFn;
|
||||
|
||||
// reset for the next use
|
||||
@ -628,7 +630,7 @@ SimpleTest.waitForClipboard = function(aExpectedStringOrValidatorFn, aSetupFn,
|
||||
reset();
|
||||
successFn();
|
||||
} else {
|
||||
setTimeout(function() wait(validatorFn, successFn, failureFn, flavor), 100);
|
||||
setTimeout(function() { return wait(validatorFn, successFn, failureFn, flavor); }, 100);
|
||||
}
|
||||
}
|
||||
|
||||
@ -636,7 +638,7 @@ SimpleTest.waitForClipboard = function(aExpectedStringOrValidatorFn, aSetupFn,
|
||||
var preExpectedVal = SimpleTest._waitForClipboardMonotonicCounter +
|
||||
"-waitForClipboard-known-value";
|
||||
SpecialPowers.clipboardCopyString(preExpectedVal);
|
||||
wait(function(aData) aData == preExpectedVal,
|
||||
wait(function(aData) { return aData == preExpectedVal; },
|
||||
function() {
|
||||
// Call the original setup fn
|
||||
aSetupFn();
|
||||
|
Loading…
x
Reference in New Issue
Block a user