Bug 1181520 - Remove support for passing in reftest arguments via the command line, r=jmaher

This unifies how reftests are invoked across desktop and
mobile, and paves the way for introducing more complex
datatypes that are unreasonable to express on the
command line.
This commit is contained in:
James Graham 2015-08-13 13:04:58 +01:00
parent 7ecd32d3d6
commit d07c63cf39
3 changed files with 3 additions and 52 deletions

View File

@ -21,37 +21,6 @@ RefTestCmdLineHandler.prototype =
/* nsICommandLineHandler */
handle : function handler_handle(cmdLine) {
var args = { };
args.wrappedJSObject = args;
try {
var uristr = cmdLine.handleFlagWithParam("reftest", false);
if (uristr == null)
return;
try {
args.uri = cmdLine.resolveURI(uristr).spec;
}
catch (e) {
return;
}
}
catch (e) {
cmdLine.handleFlag("reftest", true);
}
try {
var nocache = cmdLine.handleFlag("reftestnocache", false);
args.nocache = nocache;
}
catch (e) {
}
try {
var skipslowtests = cmdLine.handleFlag("reftestskipslowtests", false);
args.skipslowtests = skipslowtests;
}
catch (e) {
}
/* Ignore the platform's online/offline status while running reftests. */
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService2);
@ -78,7 +47,7 @@ RefTestCmdLineHandler.prototype =
function loadReftests() {
wwatch.openWindow(null, "chrome://reftest/content/reftest.xul", "_blank",
"chrome,dialog=no,all", args);
"chrome,dialog=no,all", {});
}
var remote = false;

View File

@ -450,7 +450,6 @@ function Shuffle(array)
function StartTests()
{
var uri;
#if BOOTSTRAP
/* These prefs are optional, so we don't need to spit an error to the log */
try {
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
@ -487,24 +486,6 @@ function StartTests()
gDumpLog("REFTEST TEST-UNEXPECTED-FAIL | | Unable to find reftest.uri pref. Please ensure your profile is setup properly\n");
DoneTests();
}
#else
try {
// Need to read the manifest once we have gHttpServerPort..
var args = window.arguments[0].wrappedJSObject;
if ("nocache" in args && args["nocache"])
gNoCanvasCache = true;
if ("skipslowtests" in args && args.skipslowtests)
gRunSlowTests = false;
uri = args.uri;
} catch (e) {
++gTestResults.Exception;
gDumpLog("REFTEST TEST-UNEXPECTED-FAIL | | EXCEPTION: " + ex + "\n");
DoneTests();
}
#endif
if (gShuffle) {
gNoCanvasCache = true;

View File

@ -205,6 +205,7 @@ class RefTest(object):
if options.shuffle:
prefs['reftest.shuffle'] = True
prefs['reftest.focusFilterMode'] = options.focusFilterMode
prefs['reftest.uri'] = "file://%s" % os.path.abspath(manifest)
# Ensure that telemetry is disabled, so we don't connect to the telemetry
# server in the middle of the tests.
@ -610,7 +611,7 @@ class RefTest(object):
try:
reftestlist = self.getManifestPath(testPath)
if cmdlineArgs == None:
cmdlineArgs = ['-reftest', reftestlist]
cmdlineArgs = []
profile = self.createReftestProfile(options, reftestlist)
profileDir = profile.profile # name makes more sense