Skip to content

Commit 499bf8b

Browse files
committed
Update JS test
1 parent 15f0576 commit 499bf8b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

web/test/test_base.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ QUnit.test("stable decode", async function (assert) {
6767

6868
pro0.remove();
6969

70+
// test mode autodetect
71+
const navcont = await wait_for(assert, () => {
72+
return document.querySelector('#nav-container');
73+
});
74+
assert.equal("mode-b", navcont.classList.toString());
75+
76+
const modebutton = await wait_for(assert, () => {
77+
return document.querySelector('#mode-val');
78+
});
79+
assert.equal("B", modebutton.textContent);
80+
81+
// next frame
7082
await load_image(1);
7183
Recv.on_frame(0, '');
7284

web/test_recv.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@
1616
<div id="crosshair1" class="crosshairs"></div>
1717
<div id="crosshair2" class="crosshairs"></div>
1818
</div>
19+
20+
<div id="nav-container" class="mode-auto">
21+
<a id="mode-val">?</a>
22+
</div>
23+
1924
<div class="statusbox" id="errorbox">hi</div>
2025
<div class="statusbox" id="t0">hi</div>
2126
<div class="statusbox" id="t1">hi</div>
27+
<div class="statusbox" id="t2">hi</div>
28+
<div class="statusbox" id="t3">hi</div>
29+
<div class="statusbox" id="framesInFlight"></div>
2230
<div class="statusbox" id="tdec">hi</div>
2331

24-
2532
<script src="recv.js"></script>
2633
<script src="zstd.js"></script>
2734

0 commit comments

Comments
 (0)