Closed Bug 932750 Opened 12 years ago Closed 11 years ago

Add helper methods to GaiaData to get and set Gecko prefs

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v1.2 fixed)

RESOLVED FIXED
Tracking Status
b2g-v1.2 --- fixed

People

(Reporter: bsilverberg, Assigned: bsilverberg)

References

Details

(Whiteboard: [gaia-ui-test][mentor=bsilverberg][lang=py])

Attachments

(2 files)

These methods should be added to [1]. At this point I'm not sure if set will work, and we only need get for now, but it's worth investigating and trying to get set working now as well. Sample code for getting a Gecko pref is: self.marionette.execute_script("SpecialPowers.getBoolPref('privacy.donottrackheader.value');", special_powers=True) Sample for setting a Gecko pref can be seen at [2]. I suggest adding a method for each get and set, and those methods would have to accept both the pref and the datatype, so that the correct JS statement can be crafted. [1] https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L133 [2] http://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/settings.js#l434
Blocks: 932753
Assignee: nobody → bob.silverberg
Attachment #831252 - Flags: review?(zcampbell)
Attachment #831252 - Flags: review?(trifandreialin)
Attachment #831252 - Flags: review?(moz.teodosia)
Attachment #831252 - Flags: review?(florin.strugariu)
Attachment #831252 - Flags: review?(andrei.hutusoru)
This should be cherry-picked into v1.2 after it is merged into master.
Thanks for the reviews, folks (but you all forgot to r- the PR). I have updated the PR so please re-review.
(In reply to Bob Silverberg [:bsilverberg] from comment #3) > Thanks for the reviews, folks (but you all forgot to r- the PR). I have > updated the PR so please re-review. I reviewed, but I wasn't asked for one, so I didn't r- ;)
(In reply to Dave Hunt (:davehunt) from comment #4) > (In reply to Bob Silverberg [:bsilverberg] from comment #3) > > Thanks for the reviews, folks (but you all forgot to r- the PR). I have > > updated the PR so please re-review. > > I reviewed, but I wasn't asked for one, so I didn't r- ;) Hey, a review is a review, isn't it? ;)
Attachment #831252 - Flags: review?(dave.hunt)
Attachment #831252 - Flags: review?(andrei.hutusoru) → review+
Comment on attachment 831252 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13644 I have made another update to the PR, which includes squashing the commits.
Attachment #831252 - Flags: review+ → review?(andrei.hutusoru)
Attachment #831252 - Flags: review?(florin.strugariu) → review+
Comment on attachment 831252 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13644 This LGTM, triggered another build on Travis and looks good
Attachment #831252 - Flags: review?(andrei.hutusoru) → review+
Comment on attachment 831252 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13644 r+
Attachment #831252 - Flags: review?(zcampbell)
Attachment #831252 - Flags: review?(trifandreialin)
Attachment #831252 - Flags: review?(moz.teodosia)
Attachment #831252 - Flags: review?(dave.hunt)
Attachment #831252 - Flags: review+
Attachment #8334490 - Flags: review?(trifandreialin)
Attachment #8334490 - Flags: review?(moz.teodosia)
Attachment #8334490 - Flags: review?(bob.silverberg)
Attachment #8334490 - Flags: review?(moz.teodosia) → review+
Comment on attachment 8334490 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13834 Comments in the PR.
Attachment #8334490 - Flags: review?(bob.silverberg) → review-
Comment on attachment 8334490 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13834 Updated the pull for v1.2
Attachment #8334490 - Flags: review?(moz.teodosia)
Attachment #8334490 - Flags: review?(bob.silverberg)
Attachment #8334490 - Flags: review-
Attachment #8334490 - Flags: review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #8334490 - Flags: review?(trifandreialin)
Attachment #8334490 - Flags: review?(moz.teodosia)
Attachment #8334490 - Flags: review?(bob.silverberg)
Attachment #8334490 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: