Closed Bug 1161606 Opened 6 years ago Closed 6 years ago

Implement a 'using_permissions' context manager

Categories

(Testing :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: jgriffin, Assigned: jgriffin)

References

Details

Attachments

(1 file, 1 obsolete file)

We've implemented a push_permission method in Marionette which sets a requested permission.  But it would be useful to have a 'with_permission' context manager that restores a permission to its original value on exit.
Depends on: 1150755
It would be nice if we can specify multiple permissions too, perhaps as a dict?
Assignee: nobody → jgriffin
Status: NEW → ASSIGNED
/r/8771 - Bug 1161606 - Implement 'using_permission' context manager, r=dburns

Pull down this commit:

hg pull -r a4d0170e0f83aef42947e2f5d06149decb783eef https://reviewboard-hg.mozilla.org/gecko/
Attachment #8605948 - Flags: review?(dburns)
Summary: Implement a 'with_permission' context manager → Implement a 'using_permissions' context manager
Comment on attachment 8605948 [details]
MozReview Request: bz://1161606/jgriffin

https://reviewboard.mozilla.org/r/8769/#review7577

Ship It!
Attachment #8605948 - Flags: review?(dburns) → review+
https://hg.mozilla.org/mozilla-central/rev/52277ad80c3b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Attachment #8605948 - Attachment is obsolete: true
Attachment #8620232 - Flags: review+
You need to log in before you can comment on or make changes to this bug.