mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1346234 - Part 4: Remove writeFormattedResult from browser.js because it's never called. r=Waldo
--HG-- extra : rebase_source : 0ff195e24245ceaef2877b69680e4e1968725080
This commit is contained in:
parent
817afd11bb
commit
111a8f35a3
@ -219,7 +219,6 @@
|
||||
var NodePrototypeAppendChild = global.Node.prototype.appendChild;
|
||||
var NodePrototypeTextContentSetter =
|
||||
ObjectGetOwnPropertyDescriptor(global.Node.prototype, "textContent").set;
|
||||
var HTMLElementPrototypeSetAttribute = global.Element.prototype.setAttribute;
|
||||
|
||||
// Cached DOM nodes used by the test harness itself. (We assume the test
|
||||
// doesn't misbehave in a way that actively interferes with what the test
|
||||
@ -241,10 +240,6 @@
|
||||
return ReflectApply(DocumentCreateElement, document, [name]);
|
||||
}
|
||||
|
||||
function HTMLSetAttribute(element, name, value) {
|
||||
ReflectApply(HTMLElementPrototypeSetAttribute, element, [name, value]);
|
||||
}
|
||||
|
||||
function SetTextContent(element, text) {
|
||||
ReflectApply(NodePrototypeTextContentSetter, element, [text]);
|
||||
}
|
||||
@ -276,36 +271,6 @@
|
||||
AppendChild(printOutputContainer, h2);
|
||||
}
|
||||
global.writeHeaderToLog = writeHeaderToLog;
|
||||
|
||||
// XXX This function overwrites one in shell.js. We should define the
|
||||
// separate versions in a single location. Also the dependence on
|
||||
// |global.{PASSED,FAILED}| is very silly.
|
||||
function writeFormattedResult(expect, actual, string, passed) {
|
||||
// XXX remove this? it's unneeded in the shell version
|
||||
string = String(string);
|
||||
|
||||
dump(string + "\n");
|
||||
|
||||
var font = CreateElement("font");
|
||||
if (passed) {
|
||||
HTMLSetAttribute(font, "color", "#009900");
|
||||
SetTextContent(font, " \u00A0" + global.PASSED);
|
||||
} else {
|
||||
HTMLSetAttribute(font, "color", "#aa0000");
|
||||
SetTextContent(font, "\u00A0" + global.FAILED + expect);
|
||||
}
|
||||
|
||||
var b = CreateElement("b");
|
||||
AppendChild(b, font);
|
||||
|
||||
var tt = CreateElement("tt");
|
||||
SetTextContent(tt, string);
|
||||
AppendChild(tt, b);
|
||||
|
||||
AppendChild(printOutputContainer, tt);
|
||||
AppendChild(printOutputContainer, CreateElement("br"));
|
||||
}
|
||||
global.writeFormattedResult = writeFormattedResult;
|
||||
})(this);
|
||||
|
||||
|
||||
|
@ -353,7 +353,7 @@
|
||||
/** Set up test environment. */
|
||||
function startTest() {
|
||||
if (global.BUGNUMBER)
|
||||
global.print("BUGNUMBER: " + global.BUGNUMBER);
|
||||
print("BUGNUMBER: " + global.BUGNUMBER);
|
||||
}
|
||||
global.startTest = startTest;
|
||||
|
||||
@ -408,14 +408,6 @@
|
||||
}
|
||||
global.currentFunc = currentFunc;
|
||||
|
||||
// XXX This function is *only* used in harness functions and really shouldn't
|
||||
// be exported.
|
||||
var writeFormattedResult =
|
||||
function writeFormattedResult(expect, actual, string, passed) {
|
||||
print((passed ? PASSED : FAILED) + string + ' expected: ' + expect);
|
||||
};
|
||||
global.writeFormattedResult = writeFormattedResult;
|
||||
|
||||
/*
|
||||
* wrapper for test case constructor that doesn't require the SECTION
|
||||
* argument.
|
||||
@ -689,7 +681,7 @@
|
||||
var passed = getTestCaseResult(expect, actual);
|
||||
// if running under reftest, let it handle result reporting.
|
||||
if (!isReftest) {
|
||||
writeFormattedResult(expect, actual, string, passed);
|
||||
print((passed ? PASSED : FAILED) + string + ' expected: ' + expect);
|
||||
}
|
||||
return passed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user