mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-28 12:55:17 -07:00
fix: curl fetch for Linux updater, overlay restart restore, Yomitan late
- Use /usr/bin/curl on Linux for update checks to avoid Electron net-service crashes - Restore visible overlay on manual restart even when auto-start visibility is disabled - Reload overlay windows after Yomitan extension loads to fix popup race on startup
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { reloadOverlayWindowsForYomitanContentScripts } from './yomitan-extension-overlay-reload';
|
||||
|
||||
test('reloadOverlayWindowsForYomitanContentScripts reloads only live overlay windows', () => {
|
||||
const calls: string[] = [];
|
||||
const windows = [
|
||||
{
|
||||
isDestroyed: () => false,
|
||||
webContents: {
|
||||
isDestroyed: () => false,
|
||||
reload: () => calls.push('live'),
|
||||
},
|
||||
},
|
||||
{
|
||||
isDestroyed: () => true,
|
||||
webContents: {
|
||||
isDestroyed: () => false,
|
||||
reload: () => calls.push('destroyed-window'),
|
||||
},
|
||||
},
|
||||
{
|
||||
isDestroyed: () => false,
|
||||
webContents: {
|
||||
isDestroyed: () => true,
|
||||
reload: () => calls.push('destroyed-webcontents'),
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
assert.equal(reloadOverlayWindowsForYomitanContentScripts(windows), 1);
|
||||
assert.deepEqual(calls, ['live']);
|
||||
});
|
||||
Reference in New Issue
Block a user