Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see

Merge pull request #18464 from KevinGrandon/bug_996968_homescreen_boo…


Bug 996968 - Intermittent gaia-integration TEST-UNEXPECTED-FAIL | Update bookmark on homescreen > Navigate to sample.html and bookmark it on homescreen
latest commit eb97461e75
Kevin Grandon KevinGrandon authored April 19, 2014
Octocat-spinner-32 apps Merge pull request #18464 from KevinGrandon/bug_996968_homescreen_boo… April 19, 2014
Octocat-spinner-32 bin Bug 987383 - Make sure to deal with empty output so that JSON stay va… April 17, 2014
Octocat-spinner-32 build Merge pull request #18363 from steveck-chung/bug-992233 April 18, 2014
Octocat-spinner-32 customization Bug 938896 - Find My Device client. April 01, 2014
Octocat-spinner-32 distribution_tablet Edit for readability April 05, 2014
Octocat-spinner-32 dogfood_apps Bug 989357 - Recompressed the new application icons r=crdlc,ran April 01, 2014
Octocat-spinner-32 external-apps Bug 989470 - Fix MCC/MNC dual SIM detection in Marketplace app March 31, 2014
Octocat-spinner-32 locales Bug 993095 - Remove extra quotation mark that was added accidentally. April 14, 2014
Octocat-spinner-32 media-samples Revert "Merge pull request #15748 from wanderview/ogg-to-opus" March 06, 2014
Octocat-spinner-32 shared Bug 996968 - Intermittent gaia-integration TEST-UNEXPECTED-FAIL | Upd… April 19, 2014
Octocat-spinner-32 showcase_apps Bug 959447 - Remove twittershare test app January 16, 2014
Octocat-spinner-32 test_apps Merge pull request #18437 from KevinGrandon/bug_985460_home2_icon_mov… April 18, 2014
Octocat-spinner-32 test_external_apps Bug 939021 - [UITest][API] Fix and improve mozPay tests. r=zac January 24, 2014
Octocat-spinner-32 test_media Bug 915661 - [Gallery] Add Marionette tests November 01, 2013
Octocat-spinner-32 tests Merge pull request #18175 from azasypkin/bug-988711-settings-entry April 18, 2014
Octocat-spinner-32 tools Bug 996528 - Revive gaia keyboard in firefox nightly. r=vingtetun April 17, 2014
Octocat-spinner-32 .gitignore Bug 897352 - [gaia build system] Transition to a build_stage for asse… April 07, 2014
Octocat-spinner-32 .jsdocrc Bug 950080 - add jsdoc generator to gaia January 28, 2014
Octocat-spinner-32 .jshintignore Bug 969101: Initial implementation of a first-time use ping. r=fabrice April 03, 2014
Octocat-spinner-32 .jshintrc Bug 987282 - JSHint allow getter without setter globally r=julienw March 24, 2014
Octocat-spinner-32 .travis.yml [ci skip] do not run travis for calendar visual refresh branch March 07, 2014
Octocat-spinner-32 Bug 904006 - Build process customization for operator apps August 30, 2013
Octocat-spinner-32 Bug 876601 - update and May 29, 2013
Octocat-spinner-32 Gruntfile.js Revert "Merge pull request #17807 from huchengtw-moz/system2/Bug_9715… April 03, 2014
Octocat-spinner-32 LICENSE Bug 929926 - LICENCE is mis-spelled October 24, 2013
Octocat-spinner-32 Makefile Revert "Merge pull request #18308 from cctuan/968661-3" April 17, 2014
Octocat-spinner-32 Merge pull request #17515 from evanxd/bug-978933 March 31, 2014
Octocat-spinner-32 gaia_node_modules.revision Bug 991446 - Follow-up, update gaia_node_modules.revision r=me April 18, 2014
Octocat-spinner-32 package.json Bug 991446 - Fix coverage when tests are run in their own sandbox April 18, 2014
Octocat-spinner-32 taskgraph.json Bug 989274 - Update to new image and simplify commands as the result March 28, 2014
Octocat-spinner-32 travisaction.opts Bug 917044 - Run gjslint, unit tests and integration tests in parallel September 17, 2013

Gaia Build Status

Gaia is Mozilla's Phone UX for the Boot to Gecko (B2G) project.

Boot to Gecko aims to create a complete, standalone operating system for the open web.

You can read more about B2G here:

follow us on twitter: @Boot2Gecko

join the Gaia mailing list:

and talk to us on IRC:

#gaia on

Hacking Gaia

The Gaia/Hacking page on MDN has all the information that you need to start working on Gaia, including building and running Gaia on a compatible device or desktop computer.

Shepherd (bot)

Opt-into new features by adding +shepherd to your first commit.

Features available:

  • automatic github -> bugzilla linking


Unit Tests

Unit tests for an app go in apps/<APP>/test/unit/.

To run all the unit tests with B2G Desktop:

  1. Run DEBUG=1 make
  2. Run make test-agent-server &
  3. Run B2G Desktop and open the Test Agent app
  4. Run make test-agent-test

    or make test-agent-test APP=<APP> to run unit tests for a specific app

More importantly, you can use test-agent-server to watch the files on the filesystem and execute relevant tests when they change:

  1. Run DEBUG=1 make
  2. Run make test-agent-server &
  3. Run B2G Desktop and open the Test Agent app
  4. Edit files and when you save them, glance at the console with test-agent-server running

Note: If you add new files, you will need to restart test-agent-server.

As a convenience, you can also use the gaia-test script to launch the test-agent-server and open the Test Agent app in firefox:

  1. Add firefox to your $PATH or set $FIREFOX to your preferred firefox/aurora/nightly binary.
  2. Run ./bin/gaia-test to run the test-agent-server and launch firefox.
  3. Run make test-agent-test or modify files as described above.

For more details on writing tests, see:

Integration Tests

Gaia uses marionette-js-runner to run the tests with a custom builder for gaia. Tests should live with the rest of your apps code (in apps/my_app/test/marionette) and test files should end in _test.js.

All integration tests run under a node environment. You need node >= 0.10 for this to work predictably.

Shared code for tests lives under shared/test/integration.

Running integration tests

NOTE: unless your tests end in _test.js they will not be automatically picked up by make test-integration.

make test-integration

Invoking a test file

make test-integration TEST_FILES=<test>

For example, we could run the day_view_test.js test in calendar app with the below command.

make test-integration TEST_FILES=apps/calendar/test/marionette/day_view_test.js

If you would like to run more than one test, we could do the below command.

make test-integration TEST_FILES="apps/calendar/test/marionette/day_view_test.js apps/calendar/test/marionette/today_test.js"

Invoking tests for a specific app

make test-integration APP=<APP>

For example, we could run all tests for the calendar app with make test-integration APP=calendar.

Skipping a test file

make test-integration SKIP_TEST_FILES=<test>

For example, we could skip the day_view_test.js test in calendar app with the below command.

make test-integration SKIP_TEST_FILES=apps/calendar/test/marionette/day_view_test.js

If you would like to skip more than one test, we could do the below command.

make test-integration SKIP_TEST_FILES="apps/calendar/test/marionette/day_view_test.js apps/calendar/test/marionette/today_test.js"

Notice that we could not use the TEST_FILES and SKIP_TEST_FILES parameters at the same time.

Running tests while working

If you wish to run many tests in background you might not want to be disturbed by the b2g-desktop window popping everytime, or the sound. One solution for the first issue is to use Xvfb:

xvfb-run make test-integration

If you are using PulseAudio and want to keep the tests quied, then just force an invalid server:

PULSE_SERVER=":" make test-integration

You can of course combine both:

PULSE_SERVER=":" xvfb-run make test-integration

Running tests without building profile

if you would like to run tests without building profile, use make test-integration-test:

PROFILE_FOLDER=profile-test make # generate profile directory in first time
make test-integration-test

Debugging Tests

To view log out from a test

make test-integration VERBOSE=1

Where to find documentation


  • For performance reasons we don't run make profile for each test run this means you need to manually remove the profile-test folder when you make changes to your apps.

  • If you don't have a b2g folder one will be downloaded for you. This can be problematic if you're offline. You can symlink a b2g-desktop directory to b2g/ in gaia to avoid the download.

  • If you have some weird node errors, try removing node_modules since things may be stale.

  • To get debug information from the b2g desktop client, run this: DEBUG=b2g-desktop TEST_FILES=name/of/test.js ./bin/gaia-marionette

  • To get debug information from b2g desktop and all of the marionette plugins, run this: DEBUG=* TEST_FILES=name/of/test.js ./bin/gaia-marionette

UI Tests


See Gaia functional tests README


See how to run the Gaia endurance tests

Generate jsdoc

To generate API reference locally, you have to install grunt with following command:

$ npm -g grunt-cli

then run make docs command to generate docs. The generated API docs will be located in docs folder.

Something went wrong with that request. Please try again.