Commit 07056b1b authored by Paolo Amadini's avatar Paolo Amadini
Browse files

Bug 1365649 - Improve browser-chrome self-tests and the "fail-if" manifest...

Bug 1365649 - Improve browser-chrome self-tests and the "fail-if" manifest property handling. r=Mossop

The browser-chrome self-test files now use the setExpectedFailuresForSelfTest function to specify the exact number of assertion failures that will be triggered. Also, most failures are now intercepted when specifying the "fail-if" property in a "browser.ini" manifest, while previously only those triggered using the "ok" function were intercepted. This allows re-enabling several browser-chome self-tests.

MozReview-Commit-ID: DlDjWaJPfvH

--HG--
extra : rebase_source : 498914c84ab69dd484fb5487ad9967073c331fd3
parent 914b992e
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -132,6 +132,9 @@
      get failCount() {
      get failCount() {
        return this.results.filter(t => !t.info && !t.pass).length;
        return this.results.filter(t => !t.info && !t.pass).length;
      },
      },
      get allowedFailureCount() {
        return this.results.filter(t => t.allowedFailure).length;
      },


      addResult: function addResult(result) {
      addResult: function addResult(result) {
        this.lastOutputTime = Date.now();
        this.lastOutputTime = Date.now();
+199 −122
Original line number Original line Diff line number Diff line
@@ -165,9 +165,9 @@ function Tester(aTests, structuredLogger, aCallback) {


  this._toleratedUncaughtRejections = null;
  this._toleratedUncaughtRejections = null;
  this._uncaughtErrorObserver = ({message, date, fileName, stack, lineNumber}) => {
  this._uncaughtErrorObserver = ({message, date, fileName, stack, lineNumber}) => {
    let error = message;
    let ex = message;
    if (fileName || lineNumber) {
    if (fileName || lineNumber) {
      error = {
      ex = {
        fileName: fileName,
        fileName: fileName,
        lineNumber: lineNumber,
        lineNumber: lineNumber,
        message: message,
        message: message,
@@ -178,20 +178,17 @@ function Tester(aTests, structuredLogger, aCallback) {
    }
    }


    // We may have a whitelist of rejections we wish to tolerate.
    // We may have a whitelist of rejections we wish to tolerate.
    let tolerate = this._toleratedUncaughtRejections &&
    let pass = this._toleratedUncaughtRejections &&
      this._toleratedUncaughtRejections.indexOf(message) != -1;
      this._toleratedUncaughtRejections.indexOf(message) != -1;
    let name = "A promise chain failed to handle a rejection: ";
    let name = "A promise chain failed to handle a rejection: ";
    if (tolerate) {
    if (pass) {
      name = "WARNING: (PLEASE FIX THIS AS PART OF BUG 1077403) " + name;
      name = "WARNING: (PLEASE FIX THIS AS PART OF BUG 1077403) " + name;
    }
    }


    this.currentTest.addResult(
    this.currentTest.addResult(new testResult({
      new testResult(
      pass, name, ex, todo: pass, stack,
	      /*success*/tolerate,
      allowFailure: this.currentTest.allowFailure,
        /*name*/name,
    }));
        /*error*/error,
        /*known*/tolerate,
        /*stack*/stack));
  };
  };
}
}
Tester.prototype = {
Tester.prototype = {
@@ -281,9 +278,11 @@ Tester.prototype = {
    if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 1) {
    if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 1) {
      while (gBrowser.tabs.length > 1) {
      while (gBrowser.tabs.length > 1) {
        let lastTab = gBrowser.tabContainer.lastChild;
        let lastTab = gBrowser.tabContainer.lastChild;
        let msg = baseMsg.replace("{elt}", "tab") +
        this.currentTest.addResult(new testResult({
                  ": " + lastTab.linkedBrowser.currentURI.spec;
          name: baseMsg.replace("{elt}", "tab") + ": " +
        this.currentTest.addResult(new testResult(false, msg, "", false));
                lastTab.linkedBrowser.currentURI.spec,
          allowFailure: this.currentTest.allowFailure,
        }));
        gBrowser.removeTab(lastTab);
        gBrowser.removeTab(lastTab);
      }
      }
    }
    }
@@ -315,7 +314,10 @@ Tester.prototype = {
        }
        }
        let msg = baseMsg.replace("{elt}", type);
        let msg = baseMsg.replace("{elt}", type);
        if (this.currentTest) {
        if (this.currentTest) {
          this.currentTest.addResult(new testResult(false, msg, "", false));
          this.currentTest.addResult(new testResult({
            name: msg,
            allowFailure: this.currentTest.allowFailure,
          }));
        } else {
        } else {
          if (!createdFakeTestForLogging) {
          if (!createdFakeTestForLogging) {
            createdFakeTestForLogging = true;
            createdFakeTestForLogging = true;
@@ -434,18 +436,22 @@ Tester.prototype = {
          yield func.apply(testScope);
          yield func.apply(testScope);
        }
        }
        catch (ex) {
        catch (ex) {
          this.currentTest.addResult(new testResult(false, "Cleanup function threw an exception", ex, false));
          this.currentTest.addResult(new testResult({
            name: "Cleanup function threw an exception",
            ex,
            allowFailure: this.currentTest.allowFailure,
          }));
        }
        }
      }
      }


      if (this.currentTest.passCount === 0 &&
      if (this.currentTest.passCount === 0 &&
          this.currentTest.failCount === 0 &&
          this.currentTest.failCount === 0 &&
          this.currentTest.todoCount === 0) {
          this.currentTest.todoCount === 0) {
        this.currentTest.addResult(new testResult(false, "This test contains no passes, no fails and no todos. Maybe it threw a silent exception? Make sure you use waitForExplicitFinish() if you need it.", "", false));
        this.currentTest.addResult(new testResult({
      }
          name: "This test contains no passes, no fails and no todos. Maybe" +

                " it threw a silent exception? Make sure you use" +
      if (testScope.__expected == 'fail' && testScope.__num_failed <= 0) {
                " waitForExplicitFinish() if you need it.",
        this.currentTest.addResult(new testResult(false, "We expected at least one assertion to fail because this test file was marked as fail-if in the manifest!", "", true));
        }));
      }
      }


      this.Promise.Debugging.flushUncaughtErrors();
      this.Promise.Debugging.flushUncaughtErrors();
@@ -453,12 +459,18 @@ Tester.prototype = {
      let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
      let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindowUtils);
                           .getInterface(Ci.nsIDOMWindowUtils);
      if (winUtils.isTestControllingRefreshes) {
      if (winUtils.isTestControllingRefreshes) {
        this.currentTest.addResult(new testResult(false, "test left refresh driver under test control", "", false));
        this.currentTest.addResult(new testResult({
          name: "test left refresh driver under test control",
        }));
        winUtils.restoreNormalRefresh();
        winUtils.restoreNormalRefresh();
      }
      }


      if (this.SimpleTest.isExpectingUncaughtException()) {
      if (this.SimpleTest.isExpectingUncaughtException()) {
        this.currentTest.addResult(new testResult(false, "expectUncaughtException was called but no uncaught exception was detected!", "", false));
        this.currentTest.addResult(new testResult({
          name: "expectUncaughtException was called but no uncaught" +
                " exception was detected!",
          allowFailure: this.currentTest.allowFailure,
        }));
      }
      }


      Object.keys(window).forEach(function (prop) {
      Object.keys(window).forEach(function (prop) {
@@ -471,8 +483,12 @@ Tester.prototype = {
        }
        }
        if (this._globalProperties.indexOf(prop) == -1) {
        if (this._globalProperties.indexOf(prop) == -1) {
          this._globalProperties.push(prop);
          this._globalProperties.push(prop);
          if (this._globalPropertyWhitelist.indexOf(prop) == -1)
          if (this._globalPropertyWhitelist.indexOf(prop) == -1) {
            this.currentTest.addResult(new testResult(false, "test left unexpected property on window: " + prop, "", false));
            this.currentTest.addResult(new testResult({
              name: "test left unexpected property on window: " + prop,
              allowFailure: this.currentTest.allowFailure,
            }));
          }
        }
        }
      }, this);
      }, this);


@@ -502,10 +518,11 @@ Tester.prototype = {


      // Notify a long running test problem if it didn't end up in a timeout.
      // Notify a long running test problem if it didn't end up in a timeout.
      if (this.currentTest.unexpectedTimeouts && !this.currentTest.timedOut) {
      if (this.currentTest.unexpectedTimeouts && !this.currentTest.timedOut) {
        let msg = "This test exceeded the timeout threshold. It should be " +
        this.currentTest.addResult(new testResult({
          name: "This test exceeded the timeout threshold. It should be" +
                " rewritten or split up. If that's not possible, use" +
                " rewritten or split up. If that's not possible, use" +
                  "requestLongerTimeout(N), but only as a last resort.";
                " requestLongerTimeout(N), but only as a last resort.",
        this.currentTest.addResult(new testResult(false, msg, "", false));
        }));
      }
      }


      // If we're in a debug build, check assertion counts.  This code
      // If we're in a debug build, check assertion counts.  This code
@@ -520,24 +537,53 @@ Tester.prototype = {
        let max = testScope.__expectedMaxAsserts;
        let max = testScope.__expectedMaxAsserts;
        let min = testScope.__expectedMinAsserts;
        let min = testScope.__expectedMinAsserts;
        if (numAsserts > max) {
        if (numAsserts > max) {
          let msg = "Assertion count " + numAsserts +
          // TEST-UNEXPECTED-FAIL
          this.currentTest.addResult(new testResult({
            name: "Assertion count " + numAsserts +
                  " is greater than expected range " +
                  " is greater than expected range " +
                    min + "-" + max + " assertions.";
                  min + "-" + max + " assertions.",
          // TEST-UNEXPECTED-FAIL (TEMPORARILY TEST-KNOWN-FAIL)
            pass: true, // TEMPORARILY TEST-KNOWN-FAIL
          //this.currentTest.addResult(new testResult(false, msg, "", false));
            todo: true,
          this.currentTest.addResult(new testResult(true, msg, "", true));
            allowFailure: this.currentTest.allowFailure,
          }));
        } else if (numAsserts < min) {
        } else if (numAsserts < min) {
          let msg = "Assertion count " + numAsserts +
                    " is less than expected range " +
                    min + "-" + max + " assertions.";
          // TEST-UNEXPECTED-PASS
          // TEST-UNEXPECTED-PASS
          this.currentTest.addResult(new testResult(false, msg, "", true));
          this.currentTest.addResult(new testResult({
            name: "Assertion count " + numAsserts +
                  " is less than expected range " +
                  min + "-" + max + " assertions.",
            todo: true,
            allowFailure: this.currentTest.allowFailure,
          }));
        } else if (numAsserts > 0) {
        } else if (numAsserts > 0) {
          let msg = "Assertion count " + numAsserts +
                    " is within expected range " +
                    min + "-" + max + " assertions.";
          // TEST-KNOWN-FAIL
          // TEST-KNOWN-FAIL
          this.currentTest.addResult(new testResult(true, msg, "", true));
          this.currentTest.addResult(new testResult({
            name: "Assertion count " + numAsserts +
                  " is within expected range " +
                  min + "-" + max + " assertions.",
            pass: true,
            todo: true,
            allowFailure: this.currentTest.allowFailure,
          }));
        }
      }

      if (this.currentTest.allowFailure) {
        if (this.currentTest.expectedAllowedFailureCount) {
          this.currentTest.addResult(new testResult({
            name: "Expected " +
                  this.currentTest.expectedAllowedFailureCount +
                  " failures in this file, got " +
                  this.currentTest.allowedFailureCount + ".",
            pass: this.currentTest.expectedAllowedFailureCount ==
                  this.currentTest.allowedFailureCount,
          }));
        } else if (this.currentTest.allowedFailureCount == 0) {
          this.currentTest.addResult(new testResult({
            name: "We expect at least one assertion to fail because this" +
                  " test file is marked as fail-if in the manifest.",
            todo: true,
          }));
        }
        }
      }
      }


@@ -689,13 +735,17 @@ Tester.prototype = {
    this.currentTest.scope.ExtensionTestUtils = this.ExtensionTestUtils;
    this.currentTest.scope.ExtensionTestUtils = this.ExtensionTestUtils;
    // Pass a custom report function for mochitest style reporting.
    // Pass a custom report function for mochitest style reporting.
    this.currentTest.scope.Assert = new this.Assert(function(err, message, stack) {
    this.currentTest.scope.Assert = new this.Assert(function(err, message, stack) {
      let res;
      currentTest.addResult(new testResult(err ? {
      if (err) {
        name: err.message,
        res = new testResult(false, err.message, err.stack, false, err.stack);
        ex: err.stack,
      } else {
        stack: err.stack,
        res = new testResult(true, message, "", false, stack);
        allowFailure: currentTest.allowFailure,
      }
      } : {
      currentTest.addResult(res);
        name: message,
        pass: true,
        stack,
        allowFailure: currentTest.allowFailure,
      }));
    });
    });


    this.ContentTask.setTestScope(currentScope);
    this.ContentTask.setTestScope(currentScope);
@@ -728,7 +778,10 @@ Tester.prototype = {
      // will also ignore an existing head.js attempting to import a missing
      // will also ignore an existing head.js attempting to import a missing
      // module - see bug 755558 for why this strategy is preferred anyway.
      // module - see bug 755558 for why this strategy is preferred anyway.
      if (!/^Error opening input stream/.test(ex.toString())) {
      if (!/^Error opening input stream/.test(ex.toString())) {
       this.currentTest.addResult(new testResult(false, "head.js import threw an exception", ex, false));
       this.currentTest.addResult(new testResult({
         name: "head.js import threw an exception",
         ex,
       }));
      }
      }
    }
    }


@@ -752,11 +805,13 @@ Tester.prototype = {
            try {
            try {
              yield task();
              yield task();
            } catch (ex) {
            } catch (ex) {
              let isExpected = !!this.SimpleTest.isExpectingUncaughtException();
              currentTest.addResult(new testResult({
              let stack = (typeof ex == "object" && "stack" in ex)?ex.stack:null;
                name: "Uncaught exception",
              let name = "Uncaught exception";
                pass: this.SimpleTest.isExpectingUncaughtException(),
              let result = new testResult(isExpected, name, ex, false, stack);
                ex,
              currentTest.addResult(result);
                stack: (typeof ex == "object" && "stack" in ex) ? ex.stack : null,
                allowFailure: currentTest.allowFailure,
              }));
            }
            }
            Promise.Debugging.flushUncaughtErrors();
            Promise.Debugging.flushUncaughtErrors();
            this.SimpleTest.info("Leaving test " + task.name);
            this.SimpleTest.info("Leaving test " + task.name);
@@ -769,9 +824,13 @@ Tester.prototype = {
        throw "This test didn't call add_task, nor did it define a generatorTest() function, nor did it define a test() function, so we don't know how to run it.";
        throw "This test didn't call add_task, nor did it define a generatorTest() function, nor did it define a test() function, so we don't know how to run it.";
      }
      }
    } catch (ex) {
    } catch (ex) {
      let isExpected = !!this.SimpleTest.isExpectingUncaughtException();
      if (!this.SimpleTest.isIgnoringAllUncaughtExceptions()) {
      if (!this.SimpleTest.isIgnoringAllUncaughtExceptions()) {
        this.currentTest.addResult(new testResult(isExpected, "Exception thrown", ex, false));
        this.currentTest.addResult(new testResult({
          name: "Exception thrown",
          pass: this.SimpleTest.isExpectingUncaughtException(),
          ex,
          allowFailure: this.currentTest.allowFailure,
        }));
        this.SimpleTest.expectUncaughtException(false);
        this.SimpleTest.expectUncaughtException(false);
      } else {
      } else {
        this.currentTest.addResult(new testMessage("Exception thrown: " + ex));
        this.currentTest.addResult(new testMessage("Exception thrown: " + ex));
@@ -824,7 +883,7 @@ Tester.prototype = {
          return;
          return;
        }
        }


        self.currentTest.addResult(new testResult(false, "Test timed out", null, false));
        self.currentTest.addResult(new testResult({ name: "Test timed out" }));
        self.currentTest.timedOut = true;
        self.currentTest.timedOut = true;
        self.currentTest.scope.__waitTimer = null;
        self.currentTest.scope.__waitTimer = null;
        self.nextTest();
        self.nextTest();
@@ -841,52 +900,72 @@ Tester.prototype = {
  }
  }
};
};


function testResult(aCondition, aName, aDiag, aIsTodo, aStack) {
/**
  this.name = aName;
 * Represents the result of one test assertion. This is described with a string
 * in traditional logging, and has a "status" and "expected" property used in
 * structured logging. Normally, results are mapped as follows:
 *
 *   pass:    todo:    Added to:    Described as:           Status:  Expected:
 *     true     false    passCount    TEST-PASS               PASS     PASS
 *     true     true     todoCount    TEST-KNOWN-FAIL         FAIL     FAIL
 *     false    false    failCount    TEST-UNEXPECTED-FAIL    FAIL     PASS
 *     false    true     failCount    TEST-UNEXPECTED-PASS    PASS     FAIL
 *
 * The "allowFailure" argument indicates that this is one of the assertions that
 * should be allowed to fail, for example because "fail-if" is true for the
 * current test file in the manifest. In this case, results are mapped this way:
 *
 *   pass:    todo:    Added to:    Described as:           Status:  Expected:
 *     true     false    passCount    TEST-PASS               PASS     PASS
 *     true     true     todoCount    TEST-KNOWN-FAIL         FAIL     FAIL
 *     false    false    todoCount    TEST-KNOWN-FAIL         FAIL     FAIL
 *     false    true     todoCount    TEST-KNOWN-FAIL         FAIL     FAIL
 */
function testResult({ name, pass, todo, ex, stack, allowFailure }) {
  this.info = false;
  this.name = name;
  this.msg = "";
  this.msg = "";


  this.info = false;
  if (allowFailure && !pass) {
  this.pass = !!aCondition;
    this.allowedFailure = true;
  this.todo = aIsTodo;
    this.pass = true;
    this.todo = true;
  } else {
    this.pass = !!pass;
    this.todo = todo;
  }

  this.expected = this.todo ? "FAIL" : "PASS";


  if (this.pass) {
  if (this.pass) {
    if (aIsTodo) {
    this.status = this.expected;
      this.status = "FAIL";
    return;
      this.expected = "FAIL";
    } else {
      this.status = "PASS";
      this.expected = "PASS";
  }
  }


  } else {
  this.status = this.todo ? "PASS" : "FAIL";
    if (aDiag) {

      if (typeof aDiag == "object" && "fileName" in aDiag) {
  if (ex) {
    if (typeof ex == "object" && "fileName" in ex) {
      // we have an exception - print filename and linenumber information
      // we have an exception - print filename and linenumber information
        this.msg += "at " + aDiag.fileName + ":" + aDiag.lineNumber + " - ";
      this.msg += "at " + ex.fileName + ":" + ex.lineNumber + " - ";
    }
    }
      this.msg += String(aDiag);
    this.msg += String(ex);
  }
  }
    if (aStack) {

  if (stack) {
    this.msg += "\nStack trace:\n";
    this.msg += "\nStack trace:\n";
    let normalized;
    let normalized;
      if (aStack instanceof Components.interfaces.nsIStackFrame) {
    if (stack instanceof Components.interfaces.nsIStackFrame) {
      let frames = [];
      let frames = [];
        for (let frame = aStack; frame; frame = frame.caller) {
      for (let frame = stack; frame; frame = frame.caller) {
        frames.push(frame.filename + ":" + frame.name + ":" + frame.lineNumber);
        frames.push(frame.filename + ":" + frame.name + ":" + frame.lineNumber);
      }
      }
      normalized = frames.join("\n");
      normalized = frames.join("\n");
    } else {
    } else {
        normalized = "" + aStack;
      normalized = "" + stack;
    }
    }
    this.msg += Task.Debugging.generateReadableStack(normalized, "    ");
    this.msg += Task.Debugging.generateReadableStack(normalized, "    ");
  }
  }
    if (aIsTodo) {
      this.status = "PASS";
      this.expected = "FAIL";
    } else {
      this.status = "FAIL";
      this.expected = "PASS";
    }


  if (gConfig.debugOnFailure) {
  if (gConfig.debugOnFailure) {
    // You've hit this line because you requested to break into the
    // You've hit this line because you requested to break into the
@@ -894,10 +973,9 @@ function testResult(aCondition, aName, aDiag, aIsTodo, aStack) {
    debugger;
    debugger;
  }
  }
}
}
}


function testMessage(aName) {
function testMessage(msg) {
  this.msg = aName || "";
  this.msg = msg || "";
  this.info = true;
  this.info = true;
}
}


@@ -905,20 +983,16 @@ function testMessage(aName) {
// cannot conflict with global variables used in tests.
// cannot conflict with global variables used in tests.
function testScope(aTester, aTest, expected) {
function testScope(aTester, aTest, expected) {
  this.__tester = aTester;
  this.__tester = aTester;
  this.__expected = expected;
  this.__num_failed = 0;


  var self = this;
  aTest.allowFailure = expected == "fail";
  this.ok = function test_ok(condition, name, diag, stack) {
    if (self.__expected == 'fail') {
        if (!condition) {
          self.__num_failed++;
          condition = true;
        }
    }


    aTest.addResult(new testResult(condition, name, diag, false,
  var self = this;
                                   stack ? stack : Components.stack.caller));
  this.ok = function test_ok(condition, name, ex, stack) {
    aTest.addResult(new testResult({
      name, pass: condition, ex,
      stack: stack || Components.stack.caller,
      allowFailure: aTest.allowFailure,
    }));
  };
  };
  this.is = function test_is(a, b, name) {
  this.is = function test_is(a, b, name) {
    self.ok(a == b, name, "Got " + a + ", expected " + b, false,
    self.ok(a == b, name, "Got " + a + ", expected " + b, false,
@@ -928,9 +1002,12 @@ function testScope(aTester, aTest, expected) {
    self.ok(a != b, name, "Didn't expect " + a + ", but got it", false,
    self.ok(a != b, name, "Didn't expect " + a + ", but got it", false,
            Components.stack.caller);
            Components.stack.caller);
  };
  };
  this.todo = function test_todo(condition, name, diag, stack) {
  this.todo = function test_todo(condition, name, ex, stack) {
    aTest.addResult(new testResult(!condition, name, diag, true,
    aTest.addResult(new testResult({
                                   stack ? stack : Components.stack.caller));
      name, pass: !condition, todo: true, ex,
      stack: stack || Components.stack.caller,
      allowFailure: aTest.allowFailure,
    }));
  };
  };
  this.todo_is = function test_todo_is(a, b, name) {
  this.todo_is = function test_todo_is(a, b, name) {
    self.todo(a == b, name, "Got " + a + ", expected " + b,
    self.todo(a == b, name, "Got " + a + ", expected " + b,
@@ -1005,8 +1082,9 @@ function testScope(aTester, aTest, expected) {
    self.__expectedMaxAsserts = max;
    self.__expectedMaxAsserts = max;
  };
  };


  this.setExpected = function test_setExpected() {
  this.setExpectedFailuresForSelfTest = function test_setExpectedFailuresForSelfTest(expectedAllowedFailureCount) {
    self.__expected = 'fail';
    aTest.allowFailure = true;
    aTest.expectedAllowedFailureCount = expectedAllowedFailureCount;
  };
  };


  this.finish = function test_finish() {
  this.finish = function test_finish() {
@@ -1037,7 +1115,6 @@ testScope.prototype = {
  __timeoutFactor: 1,
  __timeoutFactor: 1,
  __expectedMinAsserts: 0,
  __expectedMinAsserts: 0,
  __expectedMaxAsserts: 0,
  __expectedMaxAsserts: 0,
  __expected: 'pass',


  EventUtils: {},
  EventUtils: {},
  SimpleTest: {},
  SimpleTest: {},
+18 −28
Original line number Original line Diff line number Diff line
@@ -2,48 +2,38 @@
support-files =
support-files =
  head.js
  head.js


[browser_browserLoaded_content_loaded.js]
[browser_add_task.js]
[browser_add_task.js]
[browser_async.js]
[browser_async.js]
[browser_browserLoaded_content_loaded.js]
[browser_BrowserTestUtils.js]
[browser_BrowserTestUtils.js]
support-files =
support-files =
  dummy.html
  dummy.html
[browser_fail.js]
[browser_fail_add_task.js]
[browser_fail_async.js]
[browser_fail_if.js]
fail-if = true
[browser_fail_throw.js]
[browser_fail_timeout.js]
skip-if = true # Disabled beacuse it takes too long (bug 1178959)
[browser_fail_uncaught_rejection.js]
[browser_fail_unexpectedTimeout.js]
skip-if = true # Disabled beacuse it takes too long (bug 1178959)
[browser_getTestFile.js]
support-files =
  test-dir/*
  waitForFocusPage.html
[browser_head.js]
[browser_head.js]
[browser_pass.js]
[browser_pass.js]
[browser_parameters.js]
[browser_parameters.js]
[browser_popupNode.js]
[browser_popupNode.js]
[browser_popupNode_check.js]
[browser_popupNode_check.js]
[browser_privileges.js]
[browser_privileges.js]
[browser_requestLongerTimeout.js]
skip-if = true # Disabled beacuse it takes too long (bug 1178959)
[browser_sanityException.js]
[browser_sanityException.js]
[browser_sanityException2.js]
[browser_sanityException2.js]
[browser_waitForFocus.js]
[browser_waitForFocus.js]
skip-if = (os == "win" && e10s && debug)
skip-if = (os == "win" && e10s && debug)
[browser_getTestFile.js]
support-files =
  test-dir/*
  waitForFocusPage.html

# Disabled because it would take too long, useful to check functionality though.
#  browser_requestLongerTimeout.js
[browser_zz_fail_openwindow.js]
[browser_zz_fail_openwindow.js]
skip-if = true # this catches outside of the main loop to find an extra window
skip-if = true # this catches outside of the main loop to find an extra window
[browser_fail.js]
skip-if = true
[browser_fail_add_task.js]
skip-if = true # fail-if doesnt catch an exception outside the test
[browser_fail_async_throw.js]
skip-if = true # fail-if doesnt catch an exception outside the test
[browser_fail_fp.js]
fail-if = true
[browser_fail_pf.js]
fail-if = true
[browser_fail_throw.js]
skip-if = true # fail-if doesnt catch an exception outside the test

# Disabled beacuse it takes too long (bug 1178959)
[browser_fail_timeout.js]
skip-if = true
# Disabled beacuse it takes too long (bug 1178959)
[browser_fail_unexpectedTimeout.js]
skip-if = true
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,5 +4,5 @@ function test() {
    ok(true, "timeout ran");
    ok(true, "timeout ran");
    finish();
    finish();
  }
  }
  setTimeout(done, 10000);
  setTimeout(done, 500);
}
}
+2 −0
Original line number Original line Diff line number Diff line
setExpectedFailuresForSelfTest(6);

function test() {
function test() {
  ok(false, "fail ok");
  ok(false, "fail ok");
  is(true, false, "fail is");
  is(true, false, "fail is");
Loading