Merge lp://qastaging/~gordallott/unity/fix-hud-lose-last-application-focus into lp://qastaging/unity

Proposed by Gord Allott
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 2063
Proposed branch: lp://qastaging/~gordallott/unity/fix-hud-lose-last-application-focus
Merge into: lp://qastaging/unity
Diff against target: 174 lines (+80/-9)
3 files modified
plugins/unityshell/src/HudController.cpp (+6/-3)
tests/autopilot/autopilot/emulators/bamf.py (+54/-6)
tests/autopilot/autopilot/tests/test_hud.py (+20/-0)
To merge this branch: bzr merge lp://qastaging/~gordallott/unity/fix-hud-lose-last-application-focus
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Mirco Müller (community) Approve
Review via email: mp+94345@code.qastaging.launchpad.net

Description of the change

fixes issue with hud not returning focus correctly, hack was bad.

UNBLOCK

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

no tests

review: Needs Fixing
Revision history for this message
Gord Allott (gordallott) wrote :

now has ap test

review: Approve
Revision history for this message
Mirco Müller (macslow) wrote :

I cannot replicate the test-case Seb described in the bug-entry.

Running...

  unity/tools/autopilot run autopilot.tests.HudTests.test_restore_focus

... aborts with:
------------------------------------------------------------------

  Tests running...
  No handlers could be found for logger "autopilot.emulators.X11"
  ======================================================================
  FAIL: autopilot.tests.test_hud.HudTests.test_restore_focus
  ----------------------------------------------------------------------
  test-log: {{{
  17:31:45.413 DEBUG autopilot/emulators/unity/__init__.py:49 - Querying unity for state piece: '//HudController'
  17:31:48.092 DEBUG autopilot/emulators/unity/__init__.py:142 - Refreshing state for <autopilot.emulators.unity.hud.HudController object at 0x8beb5ac>
  17:31:48.092 DEBUG autopilot/emulators/unity/__init__.py:61 - Getting state for object HudController with id 17
  17:31:48.092 DEBUG autopilot/emulators/unity/__init__.py:49 - Querying unity for state piece: '//HudController[id=17]'
  }}}

  Traceback (most recent call last):
    File "autopilot/tests/test_hud.py", line 152, in test_restore_focus
      self.assertEqual(b.application_is_focused('Calculator'), True)
  MismatchError: False != True

  Ran 1 test in 2.767s
  FAILED (failures=1)
------------------------------------------------------------------

Running the command...

  python -m testtools.run autopilot.tests.test_hud.HudTests.test_restore_focus

... aborts with:
------------------------------------------------------------------
Xlib.protocol.request.QueryExtension
Traceback (most recent call last):
  File "./tools/autopilot", line 145, in <module>
    main()
  File "./tools/autopilot", line 139, in main
    run_tests(args)
  File "./tools/autopilot", line 106, in run_tests
    test_suite = loader.loadTestsFromNames(args.test)
  File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'HudTests'
------------------------------------------------------------------

review: Needs Fixing
Revision history for this message
Mirco Müller (macslow) wrote :

Yay, also the test works (and passes) now... sweet! Approved.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Gord Allott (gordallott) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.