Mobile/e10s/Testing

< Mobile‎ | e10s
Revision as of 21:18, 13 April 2011 by Azakai (talk | contribs)

Fennec Mochitest and Reftest

Build Fennec with enable-tests.

  • required patches:
    • bug 648104, 649776.

Running Tests

Make sure you have --enable-tests in your mozconfig as you build. You can then use normal Firefox desktop commands to run tests, like

TEST_PATH=modules/libpr0n/test/reftest/reftest.list make reftest

(do this in the OBJDIR). You will need to make a symlink called fennec-bin (pointing to fennec).

Another way to build tests is (for example, for libpr0n)

make package-tests
cd dist/test-package-stage/reftest
python runreftest.py --app=../../bin/fennec tests/modules/libpr0n/test/reftest/pngsuite-chunkorder/reftest.list

This however requires make package-tests, and you will not have your tests symlinked (so changes to them will require another make package-tests each time).

If you run a debug build, you will hit lots of "assertion count X is more than expected Y assertions". For now you can ignore those (but we should fix them eventually!)

Reftest - libpr0n

Most of these tests fail due to fennec disabling color correction (due to performance concerns). And some other will fail if using a 16bbp display. For example, see bug 648148. Also note that reftests that require drawWindow support will fail in Fennec. (For that you will want the patch in bug 648104, as mentioned before.)

cjones was able to make these mostly pass back in Feb, but since have decayed.

reftest - layout

TEST_PATH=layout/reftests/font-face/reftest.list make reftest

(as mentioned above, this assumes you have --enable-tests in your mozconfig)

mochitest - layout/base

Most of these failures are related to using the old netscape universal permissions api. Instead, we should be using SpecialPowers -- the new elevated permission api.


Many of the mochitests use some sort of elevated permission. For example, sending an keypress or composition event requires elevated permissions. I converted some of the EventUtils over to SpecialPowers in bug 649360.

To run, you can:

make package-tests
cd dist/test-package-stage/mochitest
python runreftest.py --app=../../bin/fennec --autorun --close-when-done --test-path=layout/base


layout/style is another test suite of interest. Currently this has over 90,000 tests and we fail <30 on fennec. Most of those are simple fixes for using SpecialPowers for preferences.

python runreftest.py --app=../../bin/fennec --autorun --close-when-done --test-path=layout/style