зеркало из https://github.com/mozilla/gecko-dev.git
Bug 877516 - Extend MOZ_REFTEST_VERBOSE to also send log messages synchronously. r=roc
This commit is contained in:
Родитель
7d4cb174a7
Коммит
d319b6dc38
|
@ -13,6 +13,7 @@ const XHTML_NS = "http://www.w3.org/1999/xhtml";
|
|||
|
||||
const DEBUG_CONTRACTID = "@mozilla.org/xpcom/debug;1";
|
||||
const PRINTSETTINGS_CONTRACTID = "@mozilla.org/gfx/printsettings-service;1";
|
||||
const ENVIRONMENT_CONTRACTID = "@mozilla.org/process/environment;1";
|
||||
|
||||
// "<!--CLEAR-->"
|
||||
const BLANK_URL_FOR_CLEARING = "data:text/html;charset=UTF-8,%3C%21%2D%2DCLEAR%2D%2D%3E";
|
||||
|
@ -38,6 +39,7 @@ var gFailureReason;
|
|||
var gAssertionCount = 0;
|
||||
|
||||
var gDebug;
|
||||
var gVerbose = false;
|
||||
|
||||
var gCurrentTestStartTime;
|
||||
var gClearingForAssertionCheck = false;
|
||||
|
@ -95,6 +97,8 @@ function OnInitialLoad()
|
|||
#endif
|
||||
|
||||
gDebug = CC[DEBUG_CONTRACTID].getService(CI.nsIDebug2);
|
||||
var env = CC[ENVIRONMENT_CONTRACTID].getService(CI.nsIEnvironment);
|
||||
gVerbose = !!env.get("MOZ_REFTEST_VERBOSE");
|
||||
|
||||
RegisterMessageListeners();
|
||||
|
||||
|
@ -628,12 +632,20 @@ function LoadURI(uri)
|
|||
|
||||
function LogWarning(str)
|
||||
{
|
||||
sendAsyncMessage("reftest:Log", { type: "warning", msg: str });
|
||||
if (gVerbose) {
|
||||
sendSyncMessage("reftest:Log", { type: "warning", msg: str });
|
||||
} else {
|
||||
sendAsyncMessage("reftest:Log", { type: "warning", msg: str });
|
||||
}
|
||||
}
|
||||
|
||||
function LogInfo(str)
|
||||
{
|
||||
sendAsyncMessage("reftest:Log", { type: "info", msg: str });
|
||||
if (gVerbose) {
|
||||
sendSyncMessage("reftest:Log", { type: "info", msg: str });
|
||||
} else {
|
||||
sendAsyncMessage("reftest:Log", { type: "info", msg: str });
|
||||
}
|
||||
}
|
||||
|
||||
const SYNC_DEFAULT = 0x0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче