Host: Google Fonts commands (gfonts_*) are served for every app that sets AppConfig::with_fonts; SiteHooks::fonts_changed; commands::GFONTS, testkit::assert_fonts_guards
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
da9ac11b24
commit
7f9e172196
5 changed files with 105 additions and 2 deletions
|
|
@ -227,6 +227,14 @@ pub fn assert_media_guards() {
|
|||
}
|
||||
}
|
||||
|
||||
/// The fonts commands' wrappers check their caller first. Runs against the host's source.
|
||||
pub fn assert_fonts_guards() {
|
||||
let source = include_str!("fonts_commands.rs");
|
||||
for command in commands::GFONTS {
|
||||
assert_guarded(source, command, "shell_only(&webview)?");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
@ -235,6 +243,7 @@ mod tests {
|
|||
fn the_store_commands_check_their_caller_first() {
|
||||
assert_store_guards();
|
||||
assert_media_guards();
|
||||
assert_fonts_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