GoofyPlan for an extension testing machine
From BabelWiki
This is a product of my imagination and not the work of a coder, so I would not be surprised you have big fun with it. Nevermind.
If you wish to comment, you are very welcome to do it on this dedicated forum
The idea of this page is: imagine how can be used an automatic test for extension that could :
- Inform the user whenever the locales registered in the chrome.manifest differ from the locales in the subfolders of the extension
- Inform the user when the locale creates a parsing error on install or when starting the options
- Automatize the process of:
- starting Firefox
- setting the general.useragent.locale
- closing Firefox
- dump human-intelligible alerts
Now here is what I imagine the magic program (script, app,... ?) could do for extension developers (and probably for AMO reviewers btw)
Contents |
0. Submitting an xpi to test
It would be great if this first step could be the only human interaction with the test process. Let's suppose you choose the xpi to submit, then everything from 1 to 3 below is automatic.
1. Parsing the extension
- 1.1 Detect the number and name of each locale in the chrome.manifest
- 1.2 Detect every locale subfolder in the locale folder
- 1.3 Detect if there is an optionsurl line in the install.rdf
- 1.4 Compare and dump an alert if
- 1.4.1 More locales than expected
- 1.4.2 Less locales than expected
- 1.4.3 Same number of locales but names don't match exactly (e.g in the chrome.manifest there are en-US, es-ES, de-DE, in the locale folder there are en-US, es_ES, ja-JP - Yeah, those things happen for real, you know...)
2 Starting Firefox for the first time
- 2.1 Install the extension to be tested
- 2.2 Set the general.useragent.locale on the langcode of the first locale of the list as detected in 1.1
3. Iterating the test
- 3.1 Restart Firefox
- 3.1.1 If a parsing error occurs, break the iteration and dump an alert to the user
- 3.2 If options exist as seen on 1.3 then start the options dialog of the extension
- 3.2.1 If an error occurs, break the iteration and dump an alert to the user
- 3.3 Set the general.useragent.locale on the langcode of the next locale
- 3.4 Quit Firefox
- 3.5 Loop process from 3.1 on until "next locale" number > total number of valid locales
Now I am probably losing my time and yours because I just don't know if a script (in which language ?) can :
- start/close/restart Firefox and iterate automatically
- switch useragent.general.locale automatically
- install an extension automatically
- trigger the options of an extension automatically.


