In Firefox for Android 30+, nsIPromptService.promptUsernameAndPassword() aCheckState.value is always returned as false, even if the user checks the checkbox

RESOLVED FIXED in Firefox 30

Status

()

defect
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: drew, Assigned: wesj)

Tracking

({regression})

30 Branch
Firefox 32
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox29 unaffected, firefox30 fixed, firefox31 fixed, firefox32 fixed, fennec30+)

Details

Attachments

(1 attachment)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140506152807

Steps to reproduce:

1) Within an extension, call nsIPromptService.promptUsernameAndPassword().  For example:

var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var username = {value: 'test'};
var password = {value: 'test'};
var check = {value: false};
prompts.promptUsernameAndPassword(null, 'test', 'test', username, password, 'test', check);

2) Install the extension into Firefox for Android 30+ (beta channel is currently 30).

3) Run the code.

4) Check the checkbox and submit the dialog.


Actual results:

check.value is false


Expected results:

check.value should be true
OS: Windows 7 → Android
Hardware: x86 → All
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(wjohnston)
Assignee: nobody → wjohnston
Flags: needinfo?(wjohnston)
Posted patch PatchSplinter Review
Fallout from Bug 968908. We're returning real objects now instead of strings so the string to boolean comparison is failing. This just uses the real booleans now.
Attachment #8429563 - Flags: review?(margaret.leibovic)
Blocks: 968908
tracking-fennec: --- → ?
Keywords: regression
Attachment #8429563 - Flags: review?(margaret.leibovic) → review+
Comment on attachment 8429563 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 968908
User impact if declined: Checkboxes on dialogs always return false.
Testing completed (on m-c, etc.): Landed on fx-team just now, but wanted to get a heads up here on the uplift. I think this is important to have fixed on beta.
Risk to taking this patch (and alternatives if risky): This is low risk. Just using a boolean rather than comparing it with a string.
String or IDL/UUID changes made by this patch: None.
Attachment #8429563 - Flags: approval-mozilla-beta?
Attachment #8429563 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/80bb6e3621fc
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
So this will remain broken in Firefox 30 and 31?
It's pending approval request
Comment on attachment 8429563 [details] [diff] [review]
Patch

Looks like a low-risk fix that will help user experience, let's uplift.
Attachment #8429563 - Flags: approval-mozilla-beta?
Attachment #8429563 - Flags: approval-mozilla-beta+
Attachment #8429563 - Flags: approval-mozilla-aurora?
Attachment #8429563 - Flags: approval-mozilla-aurora+
tracking-fennec: ? → 30+
You need to log in before you can comment on or make changes to this bug.