aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system/dispatcher_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-16 01:23:16 +0900
committerOphestra <cat@gensokyo.uk>2025-11-16 01:23:16 +0900
commit61972d61f650be2fb86eb2ead452b74c02b3e00f (patch)
treeca86e8190a1de3eb64ed367acaa428521bbc5b87 /internal/system/dispatcher_test.go
parentfe40af7b7e95356b7d88e35941097edc9700f093 (diff)
internal/wayland: reimplement connect/bind code
The old implementation is relocated to system/wayland/deprecated.go. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/system/dispatcher_test.go')
-rw-r--r--internal/system/dispatcher_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/system/dispatcher_test.go b/internal/system/dispatcher_test.go
index 95aab3e4..2704bca0 100644
--- a/internal/system/dispatcher_test.go
+++ b/internal/system/dispatcher_test.go
@@ -8,10 +8,12 @@ import (
"testing"
"unsafe"
+ "hakurei.app/container/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
"hakurei.app/internal/acl"
"hakurei.app/internal/dbus"
+ "hakurei.app/internal/wayland"
"hakurei.app/internal/xcb"
)
@@ -268,6 +270,15 @@ func (k *kstub) aclUpdate(name string, uid int, perms ...acl.Perm) error {
stub.CheckArgReflect(k.Stub, "perms", perms, 2))
}
+func (k *kstub) waylandNew(displayPath, bindPath *check.Absolute, appID, instanceID string) (*wayland.SecurityContext, error) {
+ k.Helper()
+ return nil, k.Expects("waylandNew").Error(
+ stub.CheckArgReflect(k.Stub, "displayPath", displayPath, 0),
+ stub.CheckArgReflect(k.Stub, "bindPath", bindPath, 1),
+ stub.CheckArg(k.Stub, "appID", appID, 2),
+ stub.CheckArg(k.Stub, "instanceID", instanceID, 3))
+}
+
func (k *kstub) xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error {
k.Helper()
return k.Expects("xcbChangeHosts").Error(