зеркало из https://github.com/mozilla/gecko-dev.git
Bug 468024 - reftest.js : optimize |outputs| assignment(s); (Av2) Check for no tests case, Whitespace cleanups; r=dbaron
This commit is contained in:
Родитель
36fec4ba6c
Коммит
f6ce689ce9
|
@ -196,6 +196,10 @@ function StartTests()
|
||||||
ReadTopManifest(window.arguments[0]);
|
ReadTopManifest(window.arguments[0]);
|
||||||
BuildUseCounts();
|
BuildUseCounts();
|
||||||
gTotalTests = gURLs.length;
|
gTotalTests = gURLs.length;
|
||||||
|
|
||||||
|
if (!gTotalTests)
|
||||||
|
throw "No tests to run";
|
||||||
|
|
||||||
gURICanvases = {};
|
gURICanvases = {};
|
||||||
StartCurrentTest();
|
StartCurrentTest();
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
@ -249,7 +253,7 @@ function ReadManifest(aURL)
|
||||||
var hh = CC[NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX + "http"].
|
var hh = CC[NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX + "http"].
|
||||||
getService(CI.nsIHttpProtocolHandler);
|
getService(CI.nsIHttpProtocolHandler);
|
||||||
sandbox.http = {};
|
sandbox.http = {};
|
||||||
for each (var prop in [ "userAgent", "appName", "appVersion",
|
for each (var prop in [ "userAgent", "appName", "appVersion",
|
||||||
"vendor", "vendorSub", "vendorComment",
|
"vendor", "vendorSub", "vendorComment",
|
||||||
"product", "productSub", "productComment",
|
"product", "productSub", "productComment",
|
||||||
"platform", "oscpu", "language", "misc" ])
|
"platform", "oscpu", "language", "misc" ])
|
||||||
|
@ -488,7 +492,7 @@ function StartCurrentURI(aState)
|
||||||
{
|
{
|
||||||
gCurrentTestStartTime = Date.now();
|
gCurrentTestStartTime = Date.now();
|
||||||
if (gFailureTimeout != null) {
|
if (gFailureTimeout != null) {
|
||||||
dump("REFTEST TEST-UNEXPECTED-FAIL | " +
|
dump("REFTEST TEST-UNEXPECTED-FAIL | " +
|
||||||
"| program error managing timeouts\n");
|
"| program error managing timeouts\n");
|
||||||
++gTestResults.Exception;
|
++gTestResults.Exception;
|
||||||
}
|
}
|
||||||
|
@ -559,13 +563,13 @@ function setupZoom(contentRootElement) {
|
||||||
function resetZoom() {
|
function resetZoom() {
|
||||||
gBrowser.markupDocumentViewer.fullZoom = 1.0;
|
gBrowser.markupDocumentViewer.fullZoom = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function OnDocumentLoad(event)
|
function OnDocumentLoad(event)
|
||||||
{
|
{
|
||||||
if (event.target != gBrowser.contentDocument)
|
if (event.target != gBrowser.contentDocument)
|
||||||
// Ignore load events for subframes.
|
// Ignore load events for subframes.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gClearingForAssertionCheck &&
|
if (gClearingForAssertionCheck &&
|
||||||
gBrowser.contentDocument.location.href == BLANK_URL_FOR_CLEARING) {
|
gBrowser.contentDocument.location.href == BLANK_URL_FOR_CLEARING) {
|
||||||
DoAssertionCheck();
|
DoAssertionCheck();
|
||||||
|
@ -871,7 +875,8 @@ function DocumentLoaded()
|
||||||
var test_passed = (equal == gURLs[0].equal);
|
var test_passed = (equal == gURLs[0].equal);
|
||||||
// what is expected on this platform (PASS, FAIL, or RANDOM)
|
// what is expected on this platform (PASS, FAIL, or RANDOM)
|
||||||
var expected = gURLs[0].expected;
|
var expected = gURLs[0].expected;
|
||||||
|
|
||||||
|
// Not 'const ...' because of 'EXPECTED_*' value dependency.
|
||||||
var outputs = {};
|
var outputs = {};
|
||||||
const randomMsg = "(EXPECTED RANDOM)";
|
const randomMsg = "(EXPECTED RANDOM)";
|
||||||
outputs[EXPECTED_PASS] = {
|
outputs[EXPECTED_PASS] = {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче