Bug 1462179: Add t.step_func() to calllback and remove closed state test. r=bwc

MozReview-Commit-ID: 3QCO21KdT7s

--HG--
extra : rebase_source : 39743965c882ef0acd68bb2736d86301ad360934
This commit is contained in:
Jan-Ivar Bruaroey 2018-05-16 19:10:10 -04:00
Родитель e642a3ee41
Коммит cded7e8993
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -81,10 +81,10 @@
let eventCount = 0;
const states = [
'stable', 'have-local-offer', 'stable', 'have-remote-offer', 'closed'
'stable', 'have-local-offer', 'stable', 'have-remote-offer',
];
pc.onsignalingstatechange = () =>
assert_equals(pc.signalingState, states[++eventCount]);
pc.onsignalingstatechange = t.step_func(() =>
assert_equals(pc.signalingState, states[++eventCount]));
const assert_state = state => {
assert_equals(state, pc.signalingState);
@ -101,8 +101,6 @@
assert_state('stable');
await pc.setRemoteDescription(await pc2.createOffer());
assert_state('have-remote-offer');
pc.close();
assert_state('closed');
}, 'Negotiation should fire signalingsstate events');
/* Operations after returning to stable state */