Host: developer mode (dev_* commands and the watcher) is served for every app that sets AppConfig::with_dev; SiteHooks::dev_theme_apply and dev_theme_end carry the app's theme file; commands::DEV, testkit::assert_dev_guards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
CRTkafa 2026-10-01 04:32:54 +07:00
parent c83f541006
commit 3402c1d85d
5 changed files with 396 additions and 5 deletions

View file

@ -251,6 +251,14 @@ pub fn assert_sync_guards() {
}
}
/// The developer-mode commands' wrappers check their caller first. Runs against the host's source.
pub fn assert_dev_guards() {
let source = include_str!("dev_commands.rs");
for command in commands::DEV {
assert_guarded(source, command, "shell_only(&webview)?");
}
}
#[cfg(test)]
mod tests {
use super::*;
@ -262,6 +270,7 @@ mod tests {
assert_fonts_guards();
assert_update_guards();
assert_sync_guards();
assert_dev_guards();
}
fn caps_with(shell_extra: &str, tab_extra: &str, site_extra: &str) -> Capabilities {