mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
- Fall back an overlapping docked recovery toolbar to the visible capsule so split built-in/library buttons never cover each other on narrow screens. - Add browser fixtures mounting real HostChrome + real PluginPanel for group, split and legacy capsule modes, including a genuine 320px iframe viewport. - Assert the real launcher is suppressed by toolbar slots and never duplicated after a bad-anchor fallback, with both split toolbars observable and clickable.
36 lines
1.2 KiB
HTML
36 lines
1.2 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Real viewport wrapper for host recovery toolbar fixtures</title>
|
|
<style>
|
|
html, body { margin: 0; background: #fff; }
|
|
/* Headless Chrome clamps --window-size=320 to a 500px viewport. A real
|
|
320px iframe is a genuine CSS viewport: window.innerWidth, 100vw,
|
|
flex-wrap and the host slot's viewport checks all see 320px. */
|
|
iframe { display: block; width: 320px; height: 640px; border: 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<iframe id="frame" title="320px viewport fixture"></iframe>
|
|
<pre id="result" style="position:relative;z-index:5;background:#fff">pending</pre>
|
|
<script>
|
|
const mode = location.hash.slice(1) || "group";
|
|
const frame = document.getElementById("frame");
|
|
const output = document.getElementById("result");
|
|
frame.src = `/test/fixtures/host-recovery-toolbar-plugin-panel.html#${encodeURIComponent(mode)}`;
|
|
const poll = () => {
|
|
try {
|
|
const text = frame.contentDocument?.getElementById("result")?.textContent;
|
|
if (text && text !== "pending") {
|
|
output.textContent = text;
|
|
return;
|
|
}
|
|
} catch { /* same-origin fixture still loading */ }
|
|
setTimeout(poll, 100);
|
|
};
|
|
setTimeout(poll, 100);
|
|
</script>
|
|
</body>
|
|
</html>
|