Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Enhance and fix the prefs module for all the features we need (#39) #40

Merged
merged 1 commit into from
Jan 8, 2015
Merged

Conversation

whimboo
Copy link
Contributor

@whimboo whimboo commented Jan 7, 2015

This fixes issue #39. @chmanchester can you please have a look? With all the changes we have everything what we need and are nearly identical with the mozmill prefs module, except for setting complex preferences. Checking our Mozmill tests I actually haven't found any instance so far where this would be necessary. Means I'm happy to not include it right now.

with self.marionette.using_context('chrome'):
return self.marionette.execute_script("""
Cu.import("resource://gre/modules/Services.jsm");
let prefBranch = Services.prefs.QueryInterface(Ci.nsIPrefBranch);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We know what Services.prefs supports, so is the QI necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! You are right, it also QI's it itself. So we should be able to remove that.

@chmanchester
Copy link
Contributor

Overall this looks good if you want to fixup and merge. Happy to discuss check it out again if you prefer.

@whimboo
Copy link
Contributor Author

whimboo commented Jan 7, 2015

Thanks Chris! I pushed another commit with all the review comments included. Before I merge this in I want to enhance the documentation for this module.

@whimboo
Copy link
Contributor Author

whimboo commented Jan 8, 2015

I pushed a new commit with the API docs. I haven't added examples yet, which we can do later once it's more clear how to structure the docs.

@whimboo whimboo self-assigned this Jan 8, 2015
@whimboo whimboo merged commit 37b8a5f into mozilla:master Jan 8, 2015
@whimboo whimboo deleted the prefs branch January 8, 2015 14:02
@whimboo whimboo removed their assignment Aug 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants