Last Comment Bug 715488 - Mostly-Permanent orange: TEST-UNEXPECTED-FAIL | test-attachment.js | test-attachment.js::test_attachments_compose_menu
: Mostly-Permanent orange: TEST-UNEXPECTED-FAIL | test-attachment.js | test-att...
: intermittent-failure
Product: Thunderbird
Classification: Client Software
Component: Testing Infrastructure (show other bugs)
: 12 Branch
: x86_64 Linux
: -- normal (vote)
: Thunderbird 12.0
Assigned To: Mike Conley (:mconley)
Depends on:
Blocks: 711085
  Show dependency treegraph
Reported: 2012-01-05 06:47 PST by Mike Conley (:mconley)
Modified: 2012-11-25 19:31 PST (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch v1 (2.57 KB, patch)
2012-01-05 07:50 PST, Mike Conley (:mconley)
no flags Details | Diff | Splinter Review
Second shot (2.99 KB, patch)
2012-01-05 11:06 PST, Mike Conley (:mconley)
no flags Details | Diff | Splinter Review
Third go at it. (3.62 KB, patch)
2012-01-05 12:53 PST, Mike Conley (:mconley)
no flags Details | Diff | Splinter Review
Fifth shot at it. (4.22 KB, patch)
2012-01-06 08:02 PST, Mike Conley (:mconley)
no flags Details | Diff | Splinter Review
Patch v7 (4.35 KB, patch)
2012-01-09 08:01 PST, Mike Conley (:mconley)
no flags Details | Diff | Splinter Review
Patch v8 (3.95 KB, patch)
2012-01-10 07:27 PST, Mike Conley (:mconley)
no flags Details | Diff | Splinter Review
Patch v9 (3.96 KB, patch)
2012-01-10 07:40 PST, Mike Conley (:mconley)
standard8: review+
Details | Diff | Splinter Review

Description Mike Conley (:mconley) 2012-01-05 06:47:30 PST
So I re-enabled the attachment tests in the Mozmill test suite (bug 711085), and now we're seeing a permanent orange on Linux.

The error message for the test is:

Test Failure: attachmentBucket is not focused!: 'Remove Attachment' != 'Delete'.
TEST-UNEXPECTED-FAIL | /buildbot/comm-central-linux-opt-unittest-mozmill/build/mozmill/attachment/test-attachment.js | test-attachment.js::test_attachments_compose_menu
Comment 1 Mike Conley (:mconley) 2012-01-05 07:19:40 PST
I've seen cases on both Linux 32 and 64 bit where the tests all pass.  They're rare, but they exist.
Comment 2 Mike Conley (:mconley) 2012-01-05 07:50:13 PST
Created attachment 586075 [details] [diff] [review]
Patch v1

I *think* the test is failing because we're not giving the event loop enough time to update the label of the cmd_delete element.

Try builds coming in here:
Comment 3 Mike Conley (:mconley) 2012-01-05 11:06:19 PST
Created attachment 586145 [details] [diff] [review]
Second shot

First patch didn't fix it.  Here's another shot.
Comment 4 Mike Conley (:mconley) 2012-01-05 12:53:34 PST
Created attachment 586187 [details] [diff] [review]
Third go at it.

Hrm, this is starting to get a little frustrating.  Trying a third time, and falling back to default error messages for assert_equals for diagnostics.
Comment 6 Mike Conley (:mconley) 2012-01-09 06:19:40 PST
I've reduced this to a focus issue that seems to be unique to Linux.  It seems that focus events are not sent to elements when the parent window is not focused.  I can reliably reproduce this on my machine.

I think I've found a workaround.  Patch forthcoming.
Comment 8 Mike Conley (:mconley) 2012-01-10 07:27:04 PST
Created attachment 587302 [details] [diff] [review]
Patch v8
Comment 9 Mike Conley (:mconley) 2012-01-10 07:40:51 PST
Created attachment 587310 [details] [diff] [review]
Patch v9
Comment 10 Mike Conley (:mconley) 2012-01-10 07:44:35 PST
Comment on attachment 587310 [details] [diff] [review]
Patch v9

Hey Jim,

I know you're swamped, but my patch is here is relatively small.  Let me know if I should redirect the review request.

Tested locally on OSX, Windows and Linux - all passing, even when the parent window is not focused.

Comment 11 Mike Conley (:mconley) 2012-01-12 15:42:05 PST
Committed to comm-central as

Note You need to log in before you can comment on or make changes to this bug.