1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! Mock-runtime tests: build a real `MockRuntime` Tauri app with the plugin
//! registered and a webview window, exercising the plugin's SHELL as far as the
//! mock runtime allows.
//!
//! ## Why this file is thin (honest note)
//!
//! The plugin's command BEHAVIOR is exhaustively covered by the crate's unit
//! tests — `core::tests` (router round-trip, event derivation, file-DB
//! persistence, config validation) and `tests::owner_thread_round_trips_over_
//! mailbox` (the real mailbox host path the Tauri commands forward onto). Those
//! run with zero Tauri machinery.
//!
//! Invoking the plugin's commands THROUGH the mock IPC additionally requires
//! the plugin's ACL manifest to be present in the runtime authority. That
//! manifest is produced by `tauri_build`/`generate_context!` at the CONSUMING
//! app's build time (from the plugin's generated `permissions/`), not by
//! `mock_context(noop_assets())` — a mock context carries no plugin manifests,
//! so a `get_ipc_response` for `plugin:syncular|…` is denied with
//! `UnknownManifest`. Rather than stand up a full `tauri.conf.json` +
//! capabilities + build-codegen fixture just to re-prove the two-line channel
//! forward the commands are, this file verifies what the mock runtime CAN
//! prove: the plugin registers, its `setup` runs (spawning the owning thread
//! and managing the mailbox state), and a window builds against it. The
//! *example app* (bindings/tauri/example) is the end-to-end wiring proof with a
//! real capabilities file.
//!
//! Building a webview needs a windowing backend a headless CI box may lack;
//! each test SKIPS (prints + returns) rather than fails when the window cannot
//! be created, keeping the suite green on a headless runner.
use ;
use WebviewWindowBuilder;