Host: native update commands (update_status, update_check, apply_update, app_ready) and the update loop are served for every app that sets AppConfig::with_updates; commands::UPDATE, testkit::assert_update_guards
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1904031e6f
commit
e88339bda6
6 changed files with 103 additions and 5 deletions
|
|
@ -235,6 +235,14 @@ pub fn assert_fonts_guards() {
|
|||
}
|
||||
}
|
||||
|
||||
/// The update commands' wrappers check their caller first. Runs against the host's source.
|
||||
pub fn assert_update_guards() {
|
||||
let source = include_str!("update_commands.rs");
|
||||
for command in commands::UPDATE {
|
||||
assert_guarded(source, command, "shell_only(&webview)?");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
@ -244,6 +252,7 @@ mod tests {
|
|||
assert_store_guards();
|
||||
assert_media_guards();
|
||||
assert_fonts_guards();
|
||||
assert_update_guards();
|
||||
}
|
||||
|
||||
fn caps_with(shell_extra: &str, tab_extra: &str, site_extra: &str) -> Capabilities {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue