~sil2100/unity-2d/precise-security

« back to all changes in this revision

Viewing changes to tests/launcher/autohide_show_tests.rb

  • Committer: Albert Astals
  • Date: 2012-01-05 14:05:30 UTC
  • mfrom: (843 unity-2d)
  • mto: This revision was merged to the branch mainline in revision 855.
  • Revision ID: albert.astals@canonical.com-20120105140530-1is8kb2wwj8bckbw
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
    xid.close!
167
167
  end
168
168
 
169
 
=begin
170
 
  # Test disabled due to bug in Xdo::Keyboard where function keys are not accepted
171
169
  test "Press Alt+F1 to focus Launcher" do
172
170
    xid = open_window_at(10,100)
173
171
    sleep 0.5
174
172
    assert_equal( Integer(@app.Unity2dPanel()['x_absolute']), -WIDTH, \
175
173
                  'Launcher visible with window in the way, should be hidden' )
176
 
    XDo::Keyboard.alt_f1
 
174
    XDo::Keyboard.alt_F1 #Must use uppercase F to indicate function keys
177
175
    sleep 0.5
178
176
    assert_equal( Integer(@app.Unity2dPanel()['x_absolute']), 0, \
179
177
                  'Launcher hiding after Alt+F1 pressed, should be visible' )
182
180
                      .QDeclarativeItem( :name => 'Dash home' ) \
183
181
                      .QDeclarativeImage( :name => 'selectionOutline' )['visible'], 'true', \
184
182
                  'Dash icon not highlighted after Alt+F1 pressed' )
185
 
    XDo::Keyboard.esc
 
183
    XDo::Keyboard.escape
186
184
    sleep 2
187
185
    assert_equal( Integer(@app.Unity2dPanel()['x_absolute']), -WIDTH, \
188
186
                  'Launcher visible with window in the way and mouse moved out, should be hidden' )
189
187
    xid.close!
190
188
  end
191
 
=end
192
189
 
193
190
end