Merge lp:~didrocks/unity-2d/lock_launcher into lp:unity-2d

Proposed by Didier Roche-Tolomelli
Status: Merged
Approved by: Gerry Boland
Approved revision: 903
Merged at revision: 914
Proposed branch: lp:~didrocks/unity-2d/lock_launcher
Merge into: lp:unity-2d
Diff against target: 181 lines (+37/-3)
7 files modified
data/com.canonical.Unity2d.gschema.xml (+1/-1)
tests/dash/dash-tests.rb (+3/-1)
tests/launcher/autohide_show_tests.rb (+7/-0)
tests/launcher/autohide_show_tests_rtl.rb (+7/-0)
tests/shell/input_shaping.rb (+7/-0)
tests/shell/input_shaping_rtl.rb (+7/-0)
tests/spread/spread-tests.rb (+5/-1)
To merge this branch: bzr merge lp:~didrocks/unity-2d/lock_launcher
Reviewer Review Type Date Requested Status
Gerry Boland Pending
Review via email: mp+91858@code.launchpad.net

Description of the change

change default to never hide launcher as per design request (LP: #928153)

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

This probably breaks all our tests :D

Revision history for this message
Gerry Boland (gerboland) wrote :

I'm working on fixing up the broken tests now.

lp:~didrocks/unity-2d/lock_launcher updated
902. By Didier Roche-Tolomelli

base on latest trunk

903. By Gerry Boland

Fix tests for new behavior

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/com.canonical.Unity2d.gschema.xml'
2--- data/com.canonical.Unity2d.gschema.xml 2012-01-27 12:39:09 +0000
3+++ data/com.canonical.Unity2d.gschema.xml 2012-02-13 17:33:35 +0000
4@@ -23,7 +23,7 @@
5 <description>Whether or not the super (also called windows key) key is used.</description>
6 </key>
7 <key name="hide-mode" type="i">
8- <default>2</default>
9+ <default>0</default>
10 <summary>Hiding mode of the launcher</summary>
11 <description>Possible values:
12 0: never hide; the launcher is always visible and windows won't overlap with it
13
14=== modified file 'tests/dash/dash-tests.rb'
15--- tests/dash/dash-tests.rb 2012-02-07 18:53:20 +0000
16+++ tests/dash/dash-tests.rb 2012-02-13 17:33:35 +0000
17@@ -214,6 +214,7 @@
18 test "Super, Super and Alt+F1 interaction" do
19 XDo::Mouse.move(200, 200, 0, true)
20 xid = TmpWindow.open_window_at(10,100)
21+ hide_mode = $SUT.execute_shell_command('gsettings get com.canonical.Unity2d.Launcher hide-mode').to_i
22 verify_equal( xid.id, TIMEOUT, 'terminal should have focus after starting it' ) {
23 XDo::XWindow.active_window
24 }
25@@ -231,7 +232,8 @@
26 verify_equal( xid.id, TIMEOUT, 'terminal should have focus after toggling the dash' ) {
27 XDo::XWindow.active_window
28 }
29- verify_equal( -LAUNCHER_WIDTH, TIMEOUT, 'Launcher should be hiding after toggling the dash' ) {
30+ verify_equal((hide_mode == 0) ? 0 : -LAUNCHER_WIDTH, TIMEOUT,
31+ 'Launcher position wrong after toggling the dash' ) {
32 @app.Launcher()['x_absolute'].to_i
33 }
34 XDo::Keyboard.alt_F1 #Must use uppercase F to indicate function keys
35
36=== modified file 'tests/launcher/autohide_show_tests.rb'
37--- tests/launcher/autohide_show_tests.rb 2012-02-07 11:18:21 +0000
38+++ tests/launcher/autohide_show_tests.rb 2012-02-13 17:33:35 +0000
39@@ -32,6 +32,7 @@
40 ############################# Test Suite #############################
41 context "Launcher Autohide and Show Tests" do
42 launcher_favorites = ""
43+ hide_mode = 0
44
45 def verify_launcher_visible(timeout, message = '')
46 verify_equal( 0, timeout, message ) {
47@@ -75,12 +76,18 @@
48 $SUT.execute_shell_command 'killall unity-2d-shell'
49 $SUT.execute_shell_command 'killall unity-2d-shell'
50
51+ hide_mode = $SUT.execute_shell_command 'gsettings get com.canonical.Unity2d.Launcher hide-mode'
52+
53+ # Set hide mode to intellihide
54+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode 2'
55+
56 # Minimize all windows
57 XDo::XWindow.toggle_minimize_all
58 end
59
60 # Run once at the end of this test suite
61 shutdown do
62+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode ' + hide_mode
63 end
64
65 # Run before each test case begins
66
67=== modified file 'tests/launcher/autohide_show_tests_rtl.rb'
68--- tests/launcher/autohide_show_tests_rtl.rb 2012-02-07 11:18:21 +0000
69+++ tests/launcher/autohide_show_tests_rtl.rb 2012-02-13 17:33:35 +0000
70@@ -32,6 +32,7 @@
71 ############################# Test Suite #############################
72 context "Launcher Autohide and Show Tests on RTL" do
73 launcher_favorites = ""
74+ hide_mode = 0
75
76 def verify_launcher_visible(timeout, message = '')
77 verify_equal( XDo::XWindow.display_geometry[0] - LAUNCHER_WIDTH, timeout, message ) {
78@@ -76,12 +77,18 @@
79 $SUT.execute_shell_command 'killall unity-2d-shell'
80 $SUT.execute_shell_command 'killall unity-2d-shell'
81
82+ hide_mode = $SUT.execute_shell_command 'gsettings get com.canonical.Unity2d.Launcher hide-mode'
83+
84+ # Set hide mode to intellihide
85+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode 2'
86+
87 # Minimize all windows
88 XDo::XWindow.toggle_minimize_all
89 end
90
91 # Run once at the end of this test suite
92 shutdown do
93+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode ' + hide_mode
94 end
95
96 # Run before each test case begins
97
98=== modified file 'tests/shell/input_shaping.rb'
99--- tests/shell/input_shaping.rb 2012-02-06 14:00:19 +0000
100+++ tests/shell/input_shaping.rb 2012-02-13 17:33:35 +0000
101@@ -33,6 +33,7 @@
102 ############################# Test Suite #############################
103 context "Shell input shape tests" do
104 pwd = File.expand_path(File.dirname(__FILE__)) + '/'
105+ hide_mode = 0
106
107 # Run once at the beginning of this test suite
108 startup do
109@@ -41,6 +42,11 @@
110 $SUT.execute_shell_command 'killall unity-2d-panel'
111 $SUT.execute_shell_command 'killall unity-2d-panel'
112
113+ hide_mode = $SUT.execute_shell_command 'gsettings get com.canonical.Unity2d.Launcher hide-mode'
114+
115+ # Set hide mode to intellihide
116+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode 2'
117+
118 # Need panel running as position of shell depends on it
119 @@panel = $SUT.run(:name => UNITY_2D_PANEL,
120 :arguments => "-testability" )
121@@ -51,6 +57,7 @@
122
123 # Run once at the end of this test suite
124 shutdown do
125+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode ' + hide_mode
126 end
127
128 # Run before each test case begins
129
130=== modified file 'tests/shell/input_shaping_rtl.rb'
131--- tests/shell/input_shaping_rtl.rb 2012-02-03 11:00:51 +0000
132+++ tests/shell/input_shaping_rtl.rb 2012-02-13 17:33:35 +0000
133@@ -33,6 +33,7 @@
134 ############################# Test Suite #############################
135 context "Shell input shape tests" do
136 pwd = File.expand_path(File.dirname(__FILE__)) + '/'
137+ hide_mode = 0
138
139 # Run once at the beginning of this test suite
140 startup do
141@@ -41,6 +42,11 @@
142 $SUT.execute_shell_command 'killall unity-2d-panel'
143 $SUT.execute_shell_command 'killall unity-2d-panel'
144
145+ hide_mode = $SUT.execute_shell_command 'gsettings get com.canonical.Unity2d.Launcher hide-mode'
146+
147+ # Set hide mode to intellihide
148+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode 2'
149+
150 # Need panel running as position of shell depends on it
151 @@panel = $SUT.run(:name => UNITY_2D_PANEL,
152 :arguments => "-testability" )
153@@ -51,6 +57,7 @@
154
155 # Run once at the end of this test suite
156 shutdown do
157+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode ' + hide_mode
158 end
159
160 # Run before each test case begins
161
162=== modified file 'tests/spread/spread-tests.rb'
163--- tests/spread/spread-tests.rb 2012-01-27 09:06:28 +0000
164+++ tests/spread/spread-tests.rb 2012-02-13 17:33:35 +0000
165@@ -86,11 +86,15 @@
166 # References
167 # * None
168 test "Super+s shows the launcher and the spread" do
169+ hide_mode = $SUT.execute_shell_command('gsettings get com.canonical.Unity2d.Launcher hide-mode').to_i
170+
171 verify_not(2, 'There should not be a Spread declarative view on startup') {
172 @app_spread.SpreadView()
173 }
174 xid = TmpWindow.open_window_at(10,100)
175- verify_equal(-LAUNCHER_WIDTH, TIMEOUT, 'The launcher should not be visible with an overlapping window') {
176+
177+ verify_equal((hide_mode == 0) ? 0 :-LAUNCHER_WIDTH, TIMEOUT,
178+ 'The launcher should not be visible with an overlapping window (unless Launcher in always-show mode)') {
179 @app_shell.Launcher()['x_absolute'].to_i
180 }
181 XDo::Keyboard.super_s

Subscribers

People subscribed via source and target branches