Commit 3efeb406 authored by Botond Ballo's avatar Botond Ballo
Browse files

Bug 1539687 - Error out if a property name is misspelt in a subtest entry. r=kats

Depends on D25176

Differential Revision: https://phabricator.services.mozilla.com/D25195

--HG--
extra : moz-landing-system : lando
parent 77067ec9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -260,6 +260,15 @@ function runSubtestsSeriallyInFreshWindows(aSubtests) {

      test = aSubtests[testIndex];

      let recognizedProps = ["file", "prefs", "dp_suppression", "onload"];
      for (let prop in test) {
        if (!recognizedProps.includes(prop)) {
          SimpleTest.ok(false, "Subtest " + test.file + " has unrecognized property '" + prop + "'");
          setTimeout(function() { advanceSubtestExecution(); }, 0);
          return;
        }
      }

      if (onlyOneSubtest && onlyOneSubtest != test.file) {
        SimpleTest.ok(true, "Skipping " + test.file + " because only " + onlyOneSubtest + " is being run");
        setTimeout(function() { advanceSubtestExecution(); }, 0);