@@ -67,9 +67,10 @@ func TestWindow_Actions(t *testing.T) {
67
67
testObjectAction (t , func () error { return w .Resize (1 , 2 ) }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdResize + "\" ,\" targetID\" :\" " + w .id + "\" ,\" windowOptions\" :{\" height\" :2,\" width\" :1}}\n " , EventNameWindowEventResize )
68
68
testObjectAction (t , func () error { return w .ResizeContent (1 , 2 ) }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdResizeContent + "\" ,\" targetID\" :\" " + w .id + "\" ,\" windowOptions\" :{\" height\" :2,\" width\" :1}}\n " , EventNameWindowEventResizeContent )
69
69
testObjectAction (t , func () error { return w .Restore () }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdRestore + "\" ,\" targetID\" :\" " + w .id + "\" }\n " , EventNameWindowEventRestore )
70
+ testObjectAction (t , func () error { return w .SetAlwaysOnTop (true ) }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdSetAlwaysOnTop + "\" ,\" targetID\" :\" " + w .id + "\" ,\" enable\" :true}\n " , EventNameWindowEventAlwaysOnTopChanged )
70
71
testObjectAction (t , func () error { return w .Show () }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdShow + "\" ,\" targetID\" :\" " + w .id + "\" }\n " , EventNameWindowEventShow )
71
72
assert .Equal (t , true , w .IsShown ())
72
- testObjectAction (t , func () error { return w .UpdateCustomOptions (WindowCustomOptions {HideOnClose : astikit .BoolPtr (true )}) }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdUpdateCustomOptions + "\" ,\" targetID\" :\" " + w .id + "\" ,\" windowOptions\" :{\" height\" :2,\" show\" :true,\" width\" :1,\" x\" :4,\" y\" :6,\" custom\" :{\" hideOnClose\" :true}}}\n " , EventNameWindowEventUpdatedCustomOptions )
73
+ testObjectAction (t , func () error { return w .UpdateCustomOptions (WindowCustomOptions {HideOnClose : astikit .BoolPtr (true )}) }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdUpdateCustomOptions + "\" ,\" targetID\" :\" " + w .id + "\" ,\" windowOptions\" :{\" alwaysOnTop \" :true, \" height\" :2,\" show\" :true,\" width\" :1,\" x\" :4,\" y\" :6,\" custom\" :{\" hideOnClose\" :true}}}\n " , EventNameWindowEventUpdatedCustomOptions )
73
74
testObjectAction (t , func () error { return w .Unmaximize () }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdUnmaximize + "\" ,\" targetID\" :\" " + w .id + "\" }\n " , EventNameWindowEventUnmaximize )
74
75
testObjectAction (t , func () error { return w .ExecuteJavaScript ("console.log('test');" ) }, w .object , wrt , "{\" name\" :\" " + EventNameWindowCmdWebContentsExecuteJavaScript + "\" ,\" targetID\" :\" " + w .id + "\" ,\" code\" :\" console.log('test');\" }\n " , EventNameWindowEventWebContentsExecutedJavaScript )
75
76
}
0 commit comments