Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 012de5b

Browse files
committed
Fix async tests in media-source
mediasource-util.js redefines test.done() to add a final assertion before actually calling done(). However, the assertion was not wrapped in test.step(), which would lead to uncaught errors.
1 parent b42e788 commit 012de5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

media-source/mediasource-util.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@
323323
test.done = function()
324324
{
325325
if (test.status == test.PASS) {
326-
assert_false(test.eventExpectations_.expectingEvents(), "No pending event expectations.");
326+
test.step(function() {
327+
assert_false(test.eventExpectations_.expectingEvents(), "No pending event expectations.");
328+
});
327329
}
328330
oldTestDone();
329331
};

0 commit comments

Comments
 (0)