Closed
Bug 826851
Opened 12 years ago
Closed 11 years ago
Unit tests for Plugin Hang UI
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: bugzilla, Assigned: bugzilla)
References
()
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
bugzilla
:
review+
|
Details | Diff | Splinter Review |
Implement unit tests for the Plugin Hang UI.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #710958 -
Flags: feedback?(vdjeric)
Comment 2•12 years ago
|
||
How long do these tests take to run end-to-end? I don't know if the automation people are ok with tests that "sleep":
https://developer.mozilla.org/en-US/docs/Mozmill_Tests/Mozmill_Style_Guide#Sleep%28%29
If the test machine is very busy, is it possible for some of these tests to fail if it takes longer than expected for the UI to come up? That would lead to intermittent orange :(
Updated•12 years ago
|
Attachment #710958 -
Flags: feedback?(vdjeric)
Assignee | ||
Comment 3•12 years ago
|
||
This version uses some Windows accessibility APIs to detect dialog start and end. This allows the tests to be event driven, instead of relying on a bunch of events to coincide and then polling for them. The entire suite took roughly one minute to run on my laptop. I'll push to try to see how we do on there.
Attachment #710958 -
Attachment is obsolete: true
Assignee | ||
Comment 4•12 years ago
|
||
This revision of the regression tests runs green on everything, including Windows XP. \o/
I also made a minor change to the Plugin Hang UI child process. I discovered that the UI having a NULL owner window was causing Windows to promote the Mochitest command prompt window to the foreground ahead of Firefox (probably because it noticed that the Firefox process was hanging during the tests). Not only is this unsightly to the user, but it breaks other Mochitests by doing so!
Now we set foreground explicitly. Note that this will not steal foreground from other programs; the window manager only allows the Plugin Hang UI to set foreground if the Plugin Hang UI itself is the current foreground process.
Attachment #726054 -
Attachment is obsolete: true
Attachment #735845 -
Flags: review?(benjamin)
Comment 5•12 years ago
|
||
Comment on attachment 735845 [details] [diff] [review]
Plugin Hang UI mochitests v3
hrm. As much as I applaud the ingenuity of this patch using ctypes to send messages, it seems like we're reinventing a UI automation framework. Did you talk to somebody in testing to see if there's a framework that already exists (ask Ted, I guess)? I'm going to mark r+ on this because it looks reasonable, but I'd prefer a real UI framework if we have one.
Attachment #735845 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 6•12 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #5)
> Comment on attachment 735845 [details] [diff] [review]
> Plugin Hang UI mochitests v3
>
> hrm. As much as I applaud the ingenuity of this patch using ctypes to send
> messages, it seems like we're reinventing a UI automation framework. Did you
> talk to somebody in testing to see if there's a framework that already
> exists (ask Ted, I guess)? I'm going to mark r+ on this because it looks
> reasonable, but I'd prefer a real UI framework if we have one.
Ted, do we have a UI automation framework for testing something like this?
Flags: needinfo?(ted)
Comment 7•12 years ago
|
||
I'm not aware of any existing Win32 UI automation that we actually use.
Flags: needinfo?(ted)
Assignee | ||
Comment 8•12 years ago
|
||
Assignee | ||
Comment 9•12 years ago
|
||
Still getting random WinXP oranges on inbound. :-( Backing out for the moment while I work on a fix.
http://hg.mozilla.org/integration/mozilla-inbound/rev/bbac34f292cf
Assignee | ||
Comment 10•11 years ago
|
||
I've retested this stuff on Try and it is running green consistently. The landing of bug 852164 fixed the intermittent problems with this test.
Rebased, carrying forward r+.
https://tbpl.mozilla.org/?tree=Try&rev=2898c16da841
https://hg.mozilla.org/integration/mozilla-inbound/rev/443dcdf8eed2
Attachment #735845 -
Attachment is obsolete: true
Attachment #8409350 -
Flags: review+
Comment 11•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•