Open Bug 890795 Opened 11 years ago Updated 4 years ago

Intermittent TEST-UNEXPECTED-FAIL | events/test_focus_autocomplete.xhtml,test_focus_autocomplete.xul | uncaught exception - NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAccessible.

Categories

(Core :: Disability Access APIs, defect, P3)

x86
macOS
defect

Tracking

()

REOPENED
Tracking Status
firefox24 --- disabled
firefox25 --- disabled
firefox26 --- disabled

People

(Reporter: cbook, Unassigned)

References

()

Details

(Keywords: intermittent-failure, Whiteboard: [test disabled on Linux and Windows][leave open][mac2020_1] )

https://tbpl.mozilla.org/php/getParsedLog.php?id=25006548&tree=Mozilla-Inbound

Ubuntu VM 12.04 mozilla-inbound debug test mochitest-other on 2013-07-07 23:06:53 PDT for push 8c48deec0349

slave: tst-linux32-ec2-103

lots of tests fail with

ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/a11y/accessible/tests/mochitest/events/test_focus_autocomplete.xul | uncaught exception - NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAccessible.getChildAt] at chrome://mochitests/content/a11y/accessible/tests/mochitest/events/test_focus_autocomplete.xul:274
Trev, any chance you could take a look at this? Seems like test_focus_autocomplete.xul has been more failure-prone in general lately.
Flags: needinfo?(trev.saunders)
So the problem seems to be that the tree of options gets focused before it has children for the current options.  Alex do you think we should just wait for focus event as well as options to be created maybe?
Flags: needinfo?(trev.saunders) → needinfo?(surkov.alexander)
(In reply to Trevor Saunders (:tbsaunde) from comment #41)
> So the problem seems to be that the tree of options gets focused before it
> has children for the current options.  Alex do you think we should just wait
> for focus event as well as options to be created maybe?

If I understand right then we should fire focus event for XUL tree and then focus event for current option when it's created. If the tree is part of autocomplete then focus should probably go (or stay) into (in) autocomplete. Can you describe please in details what supposedly happens here, I think we want to have Jamie's option.
(In reply to Trevor Saunders (:tbsaunde) from comment #41)
> So the problem seems to be that the tree of options gets focused before it
> has children for the current options.  Alex do you think we should just wait
> for focus event as well as options to be created maybe?

so actually it doesn't seem to be quiet that simple if I log focus events instead of just seeing what happens when we try and get the accessible I see that the last focus event goes to the anon html:input for the xul autocomplete
so, the test here has a <textbox> with type=autocomplete and points the autocomplete at a special test-a11y-autocomplete thing in accessible/tests/mochitest/autocomplete.js the test expects that when the text box is empty it can focus it, perform a down arrow and then a up arrow and an autocomplete option will be focused, however the anon <input> in the xbl binding gets focused. Neil, any idea what's happening with focus here or what should happen?
The anonymous input should be focused when focusing the textbox and remain focused when navigating the autocomplete list.
so, if I run this test in X instead of under xvfb the test sometimes passes and sometimes I see the assert at nsAutocompleteController.cpp:777 fire
per irc with Trev it doesn't seem accessibility issue at all so somebody who understand how autocomplete/Firefox UI works would need to look.

so we have XUL textbox autocomplete having two options: "hello" and "hi", the test does:
1) focus textbox: focus event to textbox is fired
2) press up arrow key: autocomplete popup appears

and then

somebody steals focus: popup is closed, textbox is blured, document gets focused. Some time after focus goes back to textbox.

I have no idea who steals the focus but it seems like pure UI issue.
Flags: needinfo?(surkov.alexander)
So, Trev, let's disable it on Linux for now (until we get somebody interested to look)?
> somebody steals focus: popup is closed, textbox is blured, document gets
> focused. Some time after focus goes back to textbox.
> 
> I have no idea who steals the focus but it seems like pure UI issue.

You should be able to find out what it doing this by creating a stacktrace for the focus change. (for example at nsFocusManager::Focus or nsFocusManager::Blur. You could also just enable logging with NSPR_LOG_MODULES=Focus:5 to get some info.

Also, make sure that the test waits for the window to be focused before starting.
(In reply to alexander :surkov from comment #221)
> So, Trev, let's disable it on Linux for now (until we get somebody
> interested to look)?

yeah, I guess so when I run it under my normal X server instead of xvfb the focus stealing goes away, but it starts to leak, ubt if I try to track down the leak timing gets thrown off and it stops leaking :(
Disabled on Linux and Windows. I'll land this on Aurora/Beta as well.
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f0fe90a83c1
Whiteboard: [test disabled on Linux and Windows][leave open]
In an epic fail of basic logic, I managed to disable this test on everything except Linux and Windows. Doh.

https://hg.mozilla.org/integration/mozilla-inbound/rev/01c36699c2f5
Flags: needinfo?(ryanvm)
Bulk assigning P3 to all open intermittent bugs without a priority set in Firefox components per bug 1298978.
Priority: -- → P3
didn't trigger for a while, closing as wfm
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
(In reply to alexander :surkov from comment #270)
> didn't trigger for a while, closing as wfm

it's disabled, so reopening
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: Intermittent TEST-UNEXPECTED-FAIL | /accessible/tests/mochitest/events/test_focus_autocomplete.xul | uncaught exception - NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAccessible. → Intermittent TEST-UNEXPECTED-FAIL | events/test_focus_autocomplete.xhtml,test_focus_autocomplete.xul | uncaught exception - NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAccessible.
Whiteboard: [test disabled on Linux and Windows][leave open] → [test disabled on Linux and Windows][leave open][mac2020_1]
Priority: P5 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.