author Karl Tomlinson <karlt+@karlt.net>
Wed, 13 Nov 2019 02:16:07 +0000
changeset 502533 195a6104b5fdd7b3f9d04d1ce8e0e86bdbb29869
parent 494499 be26864d5a00f770c8c5f4da0a65d259326b13df
permissions -rw-r--r--
Bug 1592781 use promise_test() to schedule TaskRunner Tasks r=jgraham promise_test() provides that a subtest is generated for each Task and run even when an exception is thrown while running a previous Task. This change also provides that Tasks that do not complete are reported TIMEOUT, andTasks that are not reached due to TIMEOUT in a previous test are reported NOTRUN. The previous logic in Task.run() to generate a subtest for reporting a PASS after calling _taskFunction() had a flaw that calls to done() during _taskFunction() would synchronously call _testharnessDone() before the subtest was generated. Differential Revision: https://phabricator.services.mozilla.com/D51563

  expected: ERROR
  [X p1 = offlineContext.suspend() incorrectly threw TypeError: "offlineContext.suspend is not a function".]
    expected: FAIL

  [X p1 instanceof Promise is not true. Got false.]
    expected: FAIL

  [Executing "test-suspend"]
    expected: FAIL

  [< [test-suspend\] 2 out of 4 assertions were failed.]
    expected: FAIL

  [Executing "test-after-close"]
    expected: TIMEOUT

  [Audit report]
    expected: NOTRUN

  [Executing "resume-running-context"]
    expected: NOTRUN