2
from Test import Test, key, set_param
3
from CairoDock import CairoDock
5
# test taskbar with ungrouped windows
6
class TestDockManager(Test):
7
def __init__(self, dock):
9
self.dt = .2 # time to update the dock size
10
Test.__init__(self, "Test Docks", dock)
14
props = self.d.GetProperties('type=Dock')
15
height_ini = props[0]['height']
18
# change the line width
19
set_param (self.get_conf_file(), "Background", "line width", "1") # from 2 to 1
20
self.d.Reload('type=Manager & name='+self.mgr)
21
sleep(self.dt) # let the 'configure' event arrive
23
props = self.d.GetProperties('type=Dock')
24
height = props[0]['height']
26
if height == height_ini:
27
self.print_error ('The dock size has not been updated')
28
elif height != height_ini - 1:
29
self.print_error ('The dock height is wrong (should be %d but is %d)' % (height_ini - 1, height))
31
set_param (self.get_conf_file(), "Background", "line width", "2") # back to normal
32
set_param (self.get_conf_file(), "Position", "screen border", "1") # from bottom to top
34
self.d.Reload('type=Manager & name='+self.mgr)
35
sleep(self.dt) # let the 'configure' event arrive
36
props = self.d.GetProperties('type=Dock')
40
self.print_error ('The dock position has not been updated')
42
print ("incorrect position (should be 0 but is %d)", y);
44
set_param (self.get_conf_file(), "Position", "screen border", "0") # back to normal
45
self.d.Reload('type=Manager & name='+self.mgr)