Closed Bug 1131181 Opened 9 years ago Closed 9 years ago

Add focusmanager.testmode: true to default prefs for firefox-ui-tests

Categories

(Testing :: Firefox UI Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla38

People

(Reporter: galgeek, Assigned: galgeek)

Details

Attachments

(1 file)

firefox-ui-tests require preference focusmanager.testmode set to true.
Assignee: nobody → galgeek
Per bug 618470 there's a problem in our method for returning the focused chrome window here [1]. According to bug 618470: "getMostRecentWindow isn't supposed to do this. The focused window can be retrieved with nsIFocusManager::GetActiveWindow." This needs to be fixed before we can turn on the pref. Because it was turned on in marionette we need a hotfix today to get tests passing again. Henrik can you look into fixing this method?

[1] https://github.com/mozilla/firefox-ui-tests/blob/master/firefox_puppeteer/ui/windows.py#L39
Flags: needinfo?(hskupin)
I wont have time today. Maybe Barbara can have a look at it? If it's not possible for her, I will check on Monday.
Flags: needinfo?(hskupin)
Maybe this is helpful, an isFocused property referencing nsiFocusManager in js?

https://dxr.mozilla.org/mozilla-central/source/addon-sdk/source/lib/sdk/window/utils.js#224

I'll see if I can do something with this in a little bit.
Services.focus is a shorthand to get to nsIFocusManager. According to mdn [1] there's a "focusedWindow" property that could be what we want.
In this context, it looks like we need the activeWindow property.

At least, that's working nicely with the test that's been failing with focusmanger.testmode: True.

I'll update the PR in a little bit.
Comment on attachment 8561524 [details] [review]
github_pull_request.txt

I've updated the PR, and it's passed Travis.
Attachment #8561524 - Flags: review?(hskupin)
Comment on attachment 8561524 [details] [review]
github_pull_request.txt

Great investigation! Thanks Barbara. I will get it landed in a bit.
Attachment #8561524 - Flags: review?(hskupin) → review+
PR has been merged as https://github.com/mozilla/firefox-ui-tests/commit/b671f9b253b930005ac6c533fe627b4aa9f6ec75
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Product: Mozilla QA → Testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: