Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 # Adblock Plus Tests | |
2 | |
3 ## Introduction | |
4 | |
5 The `adblockplustests` repository contains the test suite for the Adblock Plus | |
6 Firefox extension `adblockplus`. This test suite is itself a separate Firefox | |
Wladimir Palant
2015/10/09 17:35:01
"for the Adblock Plus Firefox extension `adblockpl
kzar
2015/10/12 11:06:07
Done.
| |
7 extension which interacts with the Adblock Plus extension in order to test it. | |
8 (It is therefore assumed that the tests should pass when the latest available | |
9 revisions of `adblockplus` and `adblockplustests` are used in combination.) | |
10 | |
11 Some of the tests in this test suite are also re-used by the Chrome/Opera/Safari | |
12 version of Adblock Plus `adblockpluschrome`. They are included in the | |
13 repository as a dependency, and they are run from within the extension using its | |
14 in-built test runner. (The dependency is managed by the `ensure_dependencies.py` | |
15 script and the expected revision of `adblockplustests` is therefore specified | |
16 explicitly.) | |
Wladimir Palant
2015/10/09 17:35:01
Please don't document technical details, these can
kzar
2015/10/12 11:06:08
Done.
| |
17 | |
18 | |
19 ## Usage | |
20 | |
21 ### Firefox | |
22 | |
23 To test your changes to Adblock Plus for Firefox you will need to build and | |
24 install both your modified version of the extension and the test suite. For | |
25 each project you will need to type the following: | |
26 | |
27 ./build.py build | |
28 | |
29 This will create a build with a name in the form | |
30 `adblockplus[tests]-1.2.3.nnnn.xpi`, which you can then manually add to Firefox. | |
31 | |
32 Alternatively, to speed up the process, you can install the | |
33 [Extension Auto-Installer](https://addons.mozilla.org/addon/autoinstaller) | |
34 extension. Assuming that Extension Auto-Installer is configured to use port 8888 | |
35 (the default value), you can build and install in one step by running: | |
36 | |
37 ./build.py autoinstall 8888 | |
38 | |
39 Once both the Adblock Plus and Adblock Plus Tests extensions have been built and | |
40 installed you can run the test suite by opening the Firefox Add-ons Manager, | |
41 pressing the "Preferences" button for the Adblock Plus Tests extension and then | |
42 pressing the "Run" button. | |
43 | |
44 Things to note: | |
45 | |
46 - The test suite can take some time to run, sometimes several minutes. | |
47 - If you re-install the Adblock Plus Tests extension you will need to re-load | |
48 the preferences page before pressing "Run" again. Otherwise the tests will not | |
49 re-start. | |
50 - The final storage tests often get stuck. | |
51 - Some tests will fail intermittently with a `NS_ERROR_FAILURE` message. | |
52 - Several `Content policy: HTML embed (Java)` tests are currently failing. | |
Wladimir Palant
2015/10/09 17:35:01
I'd not document specific test failures, these can
kzar
2015/10/12 11:06:08
Done.
| |
53 | |
54 | |
55 ### Chrome | |
Sebastian Noack
2015/10/09 12:00:09
IMO this section is irrelevant and redundant here.
kzar
2015/10/09 14:39:42
Yea, maybe you're right. I wasn't sure either way
Wladimir Palant
2015/10/09 17:35:01
I agree with Sebastian, this is unnecessary. The n
kzar
2015/10/12 11:06:07
Done.
| |
56 | |
57 To test your changes to Adblock Plus for Chrome, go to the extension's options | |
58 page, open the JavaScript Console and type: | |
59 | |
60 location.href = "qunit/index.html"; | |
61 | |
62 The unit tests should then run automatically in the page. For more information | |
63 about building and testing the Chrome extension please refer to [the project's | |
64 README file](https://hg.adblockplus.org/adblockpluschrome/file/tip/README.md). | |
OLD | NEW |