Running Tests From Extensions

From FirebugWiki

Revision as of 13:29, 17 September 2010 by Honza (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page explains how to run tests from Firebug extensions.

Run Tests From Extensions

Firebug test harness allows also running tests from all installed extensions at once. This make possible to not only test Firebug itself, but also all installed extensions and possible conflicts among them.

In order to automatically load exposed test suites from extensions into the test console you need to write following URL into the address bar and press enter.


The second option is to right click on the address bar and pick Load Registered Tests.

As soon as you see all tests loaded (tests from Firebug itself are loaded too), you can press Run All on the toolbar as usual.

Expose Tests From an Extension

In order to get test-list URLs from installed extensions, the test console dispatches an event to all modules as follows:

var testLists = [];
dispatch(Firebug.modules, "onGetTestList", [testLists]);

An extension can handle the event and expose its test-list URL:

Firebug.FireCookieModule = extend(Firebug.Module,
    onGetTestList: function(testLists)
            extension: "Firecookie",
            testListURL: "chrome://firecookie/content/testList.html"

Personal tools