Search completed in 1.15 seconds.
6 results for "Mochitests":
Adding a new CSS property
MozillaAdding a new style property
this will cause tests of your new property to be added to many of the mochitests in layout/style/test, which can be run with the command "./mach mochitest -f plain layout/style/".
... finishing up then you'll need to rebuild and run the mochitests in layout/style (./mach mochitest -f plain layout/style/).
Browser chrome tests
MozillaBrowser chrome tests
the comparison functions are identical to those supported by mochitests, see how the comparison functions work in the mochitest documentation for more details.
...make sure to also include any head.js you added to support-files, and additionally, ensure that your browser.ini is referenced by a moz.build file somewhere, such as: browser_chrome_manifests += [ 'test/functional/mochitest/browser.ini' ] support-files once added to support-file section of browser.ini support files may be referenced as https://example.com/browser/[path_to_file] or chrome://mochitests/content/browser/[path_to_file].
Metro browser chrome tests - Archive of obsolete content
ArchiveMozillaMetro browser chrome tests
test comparison functions used in metro browser chrome tests are identical to those supported by mochitests, see how the comparison functions work in the mochitest documentation for more details.
Creating reftest-based unit tests
MozillaCreating reftest-based unit tests
you can accomplish this by either: rewrite them as mochitests.
mach
MozillaDeveloper guidemach
for example: $ cd devtools/client $ mach build webconsole # rebuild only the files in the devtools/client/webconsole directory $ mach mochitest webconsole/test # run mochitests in devtools/client/webconsole/test enable tab completion to enable tab completion in bash, run the following command.
Online and offline events - Web APIs
WebAPINavigatorOnLineOnline and offline events
ventlistener('online', updateonlinestatus); window.addeventlistener('offline', updateonlinestatus); }); a touch of css #status { position: fixed; width: 100%; font: bold 1em sans-serif; color: #fff; padding: 0.5em; } #log { padding: 2.5em 0.5em 0.5em; font: 1em sans-serif; } .online { background: green; } .offline { background: red; } and the corresponding htmlxxx when mochitests for this are created, point to those instead and update this example -nickolay <div id="status"></div> <div id="log"></div> <p>this is a test</p> here's the live result notes if the api isn't implemented in the browser, you can use other signals to detect if you are offline including using service workers and responses from xmlhttprequest.