mirror of
https://github.com/servo/servo
synced 2026-04-30 03:17:15 +02:00
Update web-platform-tests to revision 71a0d51d14d8b0f1b53cda3a7d39ef8765164485
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Helper for tests that just want to verify the ordering of a series of events.
|
||||
// Usage:
|
||||
// log_test(function(t, log) {
|
||||
// log('first');
|
||||
// log('second');
|
||||
// }, ['first', 'second'], 'Ordinal numbers are ordinal');
|
||||
|
||||
function log_test(func, expected, description) {
|
||||
async_test(function(t) {
|
||||
var actual = [];
|
||||
function log(entry) {
|
||||
actual.push(entry);
|
||||
if (expected.length <= actual.length) {
|
||||
assert_array_equals(actual, expected);
|
||||
t.done();
|
||||
}
|
||||
}
|
||||
func(t, t.step_func(log));
|
||||
}, description);
|
||||
}
|
||||
Reference in New Issue
Block a user