Closed Bug 771277 Opened 12 years ago Closed 12 years ago

Fix XPCShell password authentication tests so that they don't pass around fake docShells

Categories

(Thunderbird :: Testing Infrastructure, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 16.0

People

(Reporter: mconley, Assigned: standard8)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 2 obsolete files)

Bug 669603 introduced a change that makes it impossible for us to mock docShells with JavaScript for our XPCShell tests.

We need to alter our authentication and testing infrastructure so that passing around fake docShells is no longer required.
Attached patch The fix (obsolete) — Splinter Review
This patch creates a function on nsIMsgWindow that will return the auth prompt.  This gives us the opportunity in xpcshell tests to not need to fake the docShell.

It also gives us a bit of a clearer function to call when we do really want the auth prompt.
Attached patch The fix v2 (obsolete) — Splinter Review
Now without commented out sections.
Attachment #639433 - Attachment is obsolete: true
Comment on attachment 639436 [details] [diff] [review]
The fix v2

Passes unit tests locally and still seems to work for the prompting users normally.
Attachment #639436 - Flags: superreview?(dbienvenu)
Attachment #639436 - Flags: review?(mconley)
Comment on attachment 639436 [details] [diff] [review]
The fix v2

This doesn't look like the right patch to me...
Attachment #639436 - Flags: review?(mconley) → review-
Attached patch The fix v2Splinter Review
Attachment #639436 - Attachment is obsolete: true
Attachment #639436 - Flags: superreview?(dbienvenu)
Attachment #639447 - Flags: superreview?(dbienvenu)
Attachment #639447 - Flags: review?(mconley)
looks reasonable, but it'll take me a while to rebuild and test...
Comment on attachment 639447 [details] [diff] [review]
The fix v2

sr=me, based on running the mailnews/local tests, and verifying that imap password prompting still works.
Attachment #639447 - Flags: superreview?(dbienvenu) → superreview+
I checked this in early pending Mike's review so that we could get the tree green again:

https://hg.mozilla.org/comm-central/rev/e61aeddc94ef
Comment on attachment 639447 [details] [diff] [review]
The fix v2

Review of attachment 639447 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good, everything seems to function normally, and I can't really argue with the results on tbpl.

Just two little nits, perhaps worthy of a followup patch.

Great job!

-Mike

::: mailnews/base/public/nsIMsgWindow.idl
@@ +45,5 @@
>     */
>    readonly attribute nsIDocShell messageWindowDocShell;
> +
> +    /**
> +     * Returns the auth prompt associtated with the window. This will only return

Nits:

This block is incorrectly indented, and there's a typo: "associtated" -> "associated".
Attachment #639447 - Flags: review?(mconley) → review+
I eventually got around to pushing the comment-only nits:

https://hg.mozilla.org/comm-central/rev/c1a5b1b4af57
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 16.0
Whiteboard: [tb-orange]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: