This by default creates an empty js file, but does support the
--long-timeout flag.
Differential Revision: https://phabricator.services.mozilla.com/D39888
--HG--
extra : moz-landing-system : lando
Ensure that if we try to create a mochitest of unsupported file type we return a
useful error
Differential Revision: https://phabricator.services.mozilla.com/D38224
--HG--
extra : moz-landing-system : lando
Add addtest support for per-suite arguments and multiple files. Also
support opening the created test in an editor. This allowed supporting
the wpt suite and replaces `mach wpt-create`.
# Create a wpt test
./mach addtest testing/web-platform/tests/accelerometer/test.html
# Create a wpt reftest
./mach addtest --suite wpt-reftesttesting/web-platform/tests/css/example.html --ref example-ref.html
The files created will be opened in the default editor if --editor is
supplied or a specified editor if the argument is given a value.
Differential Revision: https://phabricator.services.mozilla.com/D26339
--HG--
extra : moz-landing-system : lando
Instead of:
perl gen_template.pl -b=123456 --type=plain > path/to/test_bug123456.html
You can do:
./mach addtest --suite="mochitest-plain" > path/to/test_bug123456.html
But you can also pass in a new file path and let it guess the suite/doc:
```
# mochitest-chrome tests
./mach addtest js/xpconnect/tests/chrome/test_chrome.html
./mach addtest js/xpconnect/tests/chrome/test_chrome.xhtml
./mach addtest js/xpconnect/tests/chrome/test_chrome.xul
# mochitest-plain tests
./mach addtest js/xpconnect/tests/mochitest/test_plain.html
./mach addtest js/xpconnect/tests/mochitest/test_plain.xhtml
./mach addtest js/xpconnect/tests/mochitest/test_plain.xul
# mochitest-browser tests
./mach addtest browser/base/content/test/alerts/browser_foo.js
# xpcshell tests
./mach addtest browser/components/extensions/test/xpcshell/test_xpcshell.js
```
This also changes the mochitest template files in the following ways:
- removes the bug # boilerplate
- remove some unnecessary attributes in the template
- removes the th.template
- adds the browser.template for browser-chrome tests
Differential Revision: https://phabricator.services.mozilla.com/D25482
--HG--
rename : testing/mochitest/static/chrome.template.txt => testing/mochitest/static/chromehtml.template.txt
rename : testing/mochitest/static/test.template.txt => testing/mochitest/static/plainhtml.template.txt
rename : testing/mochitest/static/xhtml.template.txt => testing/mochitest/static/plainxhtml.template.txt
rename : testing/mochitest/static/xul.template.txt => testing/mochitest/static/plainxul.template.txt
extra : moz-landing-system : lando