3
edits
(Changed devtools mochitest link) |
(Update helper file naming convention) |
||
Line 195: | Line 195: | ||
Here's how to create a helper file: | Here's how to create a helper file: | ||
* Create a new file in your test directory, the naming convention should be | * Create a new file in your test directory, the naming convention should be helper_<description_of_the_helper>.js | ||
* Add it to the browser.ini support-files section, making sure it is sorted alphabetically | * Add it to the browser.ini support-files section, making sure it is sorted alphabetically | ||
* Load the helper file in the tests | * Load the helper file in the tests | ||
* browser/devtools/markupview/test/head.js has a handy loadHelperScript(fileName) function that you can use. | * browser/devtools/markupview/test/head.js has a handy loadHelperScript(fileName) function that you can use. | ||
* The file will be loaded in the test global scope, so any global function or variables it defines will be available (just like head.js). | * The file will be loaded in the test global scope, so any global function or variables it defines will be available (just like head.js). |
edits