Mozilla stuff



fxaccount manager overview


Running marionette-test tests on device


Docker images for Gaia UI tests

The short version:
Please stop using wait_for in Gaia tests and start using Wait and expected. See examples towards the end of this e-mail for how to construct a few of our more common waits in this way. The exception at the moment is wait_for_element_not_displayed as we don't have a good alternative when the element has not previously been found. Any new pull requests that include use of these wait_for methods will get r- however you may also be shown a cute picture of a cat, so please don't feel too bad about it! :)

The (slightly) long(er) version:
Our wait_for methods have done us well, and it's easy to forget that they pre-date the excellent wait and expected condition helpers that are now available in Marionette. It's now time to let them go, and to migrate our tests to directly use the classes offered in the Marionette client. I've started this migration in bug 1074117 on a per app object basis. The plan is that the final patch will remove these methods from our base test and page classes. If you need a little bit more convincing, check the examples below to see how clean and easy the new classes are to use. In addition, this should reduce the number of times we ask Marionette to find elements for us - see the bug mentioned above for more details.


Imports (use as needed):
from marionette import expected
from marionette import Wait

Waiting for an element to be present:
element = Wait(self.marionette).until(expected.element_present(by, locator))

Waiting for an element to be displayed (retain element for later use):
element = Wait(self.marionette).until(expected.element_present(by, locator))

Waiting for an element to be displayed (concise):
Wait(self.marionette).until(expected.element_displayed(by, locator))

Waiting for a condition to be true:
Wait(self.marionette).until(lambda m: condition)

Waiting for a condition involving an element to be true:
element = self.marionette.find_element(by, locator)
Wait(self.marionette).until(lambda m: element.condition)

Specifying a timeout:
Wait(self.marionette, timeout=60).until(...)

Specifying a failure message:
Wait(self.marionette).until(condition, message='Oh no, we failed!')

Further documentation on explicit waits and expected conditions can be found here:

2015-08-13 Marionette-listener is place where commands are being carried out.


16:28 jlorenzo: mwargers: I personally prefer to trash the virtualenv every time with that command: deactivate; rm -rf .env && virtualenv2 .env && source .env/bin/activate && python develop


17:24 mwargers: so settings are accessible by certified apps, but preferences are not accessible by certified apps? Preferences are only accessible by the system app? No, only chrome code can access preferences.



How to update GitHub forked repository?


show active b2g process

ps -o user,pid,ppid,command -ax | grep b2g


git checkout v2.1 && git fetch origin v2.1 && git rebase origin/v2.1 git rebase --abort to abort a ongoing rebase merge conflict thing

git reset --hard HEAD

git reset --hard HEAD to get back into a clean master

2015-03-19 related to

Gaia UI tests functionalities vs MJS

Gaia UI tests functionalities vs MJS

gaia integration gaia aceptance

get marionetteJS working again

make clean make really-clean


For what it's worth, this is how I rebase, and it works pretty well for me. $ git checkout master $ git pull --rebase upstream master $ git checkout feature-branch $ git rebase master This keeps my master updated from upstream, and allows me to just rebase my feature branches from my local master.


latest emulator nightly builds

2015-03-05 to record stuff


rm -Rf node_modules

Error: Cannot find module 'marionette-client' rm -Rf node_modules TEST_FILES=./apps/calendar/test/marionette/day_view_test.js make test-integration npm install -g n n 0.10.35


Finding regression ranges in b2g


update pull requests

git fetch origin master && git rebase origin/master git mergetool


Gaia Performance tests: Eli Perelman

2014-12-31 My branches.




List all the files for a commit in Git

git show hash_id git diff-tree --no-commit-id --name-only -r hash_id


Make a diff of git new and untracked files

make a diff of git new and untracked files: git diff --no-index /dev/null filename