Closed Bug 1438035 Opened 6 years ago Closed 6 years ago

Add Unicode support for profile name of switch_profile()

Categories

(Remote Protocol :: Marionette, enhancement, P1)

Version 3
enhancement

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Bug 1429759 implemented profile switching for Marionette. But that doesn't work yet for profile names given as Unicode. We should make it transparent for consumers of Marionette like this:

> self.marionette.instance.switch_profile("mozrunner")
> self.marionette.instance.switch_profile(u"mozrunner-\u0425\u0435\u043D")
> self.marionette.instance.switch_profile(u"mozrunner-Хен")

That means that `_update_profile` will have to encode the profile directory to the filesystem supported encoding before passing the path to `tempfile.mkdtemp()`.

This feature is necessary to create tests for bug 1423897.
Depends on: 1438140
It works all just fine except for test_capabilities.py where we have some external code from lib-tk running which actually forces the path to be a `str` and not a `unicode` string. The call to this code was added by bug 1369670 to circumvent the problem in our assert for uppercase and lowercase situations.

I think we should get rid of this fix given that it doesn't affect us in automation, and we just do a non case-sensitive check.
Attachment #8951182 - Flags: review?(ato)
Attachment #8951092 - Flags: review?(ato)
Comment on attachment 8951092 [details]
Bug 1438035 - [marionette] Add Unicode support for profile path in switch_profile().

https://reviewboard.mozilla.org/r/220350/#review226396
Attachment #8951092 - Flags: review?(ato) → review+
Comment on attachment 8951182 [details]
Bug 1438035 - [marionette] Remove case-sensitive check for profile path.

https://reviewboard.mozilla.org/r/220440/#review226398
Attachment #8951182 - Flags: review?(ato) → review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ccfb3473baff
[marionette] Remove case-sensitive check for profile path. r=ato
https://hg.mozilla.org/integration/autoland/rev/2eecb43376ba
[marionette] Add Unicode support for profile path in switch_profile(). r=ato
https://hg.mozilla.org/mozilla-central/rev/ccfb3473baff
https://hg.mozilla.org/mozilla-central/rev/2eecb43376ba
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: