Commit Graph

909 Commits

Author SHA1 Message Date
Paolo Amadini
dac52b86d6 Bug 1412282 - Allow calling Assert.jsm methods directly from other test-only modules. r=mikedeboer
This adds a global instance that can be used by invoking assertion methods directly on the imported Assert object. The test suites set the global reporter function to the one for the currently running test.

MozReview-Commit-ID: 8dksVc9o7r

--HG--
extra : rebase_source : 3e382c6d24c6019d29963811c37469cfc23b928f
2017-10-27 14:38:30 +01:00
Mark Banner
4de6bf22b1 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo

--HG--
extra : rebase_source : 5b45b6c0df834131812d094e975047eaad374e06
2017-10-26 11:47:01 +01:00
Geoff Brown
98bd20684f Bug 1410714 - Follow-up to fix some minor python lint problems 2017-10-24 15:41:39 -06:00
Geoff Brown
5facbdc255 Bug 1410714 - Help mach tests find adb when running Android tests; r=jmaher 2017-10-24 15:17:25 -06:00
Geoff Brown
df602eb92c Bug 1405561 - Show --verify in mochitest help and standardize --verify description; r=jmaher 2017-10-04 11:19:39 -06:00
Andrew Halberstadt
6b65448914 Bug 1403222 - Add test suite families to SCHEDULES.exclusive r=dustin
MozReview-Commit-ID: JWKB7eOgfWc

--HG--
extra : rebase_source : b81ab806cd2455f4e4fc761863fe699feadd0bb5
2017-09-26 10:47:22 -04:00
Sebastian Hengst
b1575a7d2b Backed out changeset ddfc127526b2 (bug 1403222) for failing python/mozbuild/mozbuild/test/frontend/test_reader.py::TestBuildReader::test_schedules, at least for Linux asan opt builds. r=backout on a CLOSED TREE 2017-10-02 16:03:12 +02:00
Andrew Halberstadt
ef896de9c0 Bug 1403222 - Add test suite families to SCHEDULES.exclusive r=dustin
MozReview-Commit-ID: JWKB7eOgfWc

--HG--
extra : rebase_source : 6c456c91985f2006910bda66fdbc5d18e066d020
2017-09-26 10:47:22 -04:00
Geoff Brown
1e26b50be4 Bug 1390884 - Enable limited test chaos mode in test-verify; r=jmaher
This adds new test verification steps for mochitest/reftest/xpcshell tests
with MOZ_CHAOSMODE=3 (thread scheduling and network thread scheduling).
Enabling all chaos mode features seems to destabilize test verification
so I am only enabling these features for now.
2017-09-26 13:20:28 -06:00
Steve Armand
5d8117b9de Bug 1397852 - Enable flake8 linter on testing/xpcshell. r=ahal
MozReview-Commit-ID: CvZVXQPx8jF

--HG--
extra : rebase_source : 359f148397ef5584028e343080c6774407f74db6
2017-09-14 09:51:27 -04:00
Steve Armand
5934392346 Bug 1397855 - Enable py2 and py3 linter on testing/xpcshell. r=ahal
MozReview-Commit-ID: CsfIcI1ma7J

--HG--
extra : rebase_source : 53658c33432927f72ddce0999f18c2b7df261f6d
2017-09-07 21:15:35 -04:00
Sebastian Hengst
69de1aac47 Backed out changeset ec61b7a902c2 (bug 1397855) for XPCshell bustage, at least on Android. r=backout on a CLOSED TREE 2017-09-12 21:42:12 +02:00
Steve Armand
d4bfc7402c Bug 1397855 - Enable py2 and py3 linter on testing/xpcshell. r=ahal
MozReview-Commit-ID: CsfIcI1ma7J

--HG--
extra : rebase_source : 1cdb7a848813a4a4872005095550b74c13ebecdf
2017-09-07 21:15:35 -04:00
Steve Armand
e46ff00709 Bug 1368967 - Enable the ESLint generator-star-spacing rule across mozilla-central. r=standard8
MozReview-Commit-ID: 5do3eoCEAMR

--HG--
extra : rebase_source : 5f692e474e1d7d173fcb4c9c08617f0fe489e443
2017-09-04 00:49:32 -04:00
Eric Rahm
0938982c90 Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj
--HG--
extra : rebase_source : 063c7f95dda063eafabfa1921366bd1957b8fe73
2017-08-11 17:45:18 -07:00
Geoff Brown
86e38e0e40 Bug 1390884 - Do not use chaos mode for test verification; r=jmaher
Chaos mode for test verification doesn't quite work -- it is a bit flaky still.
I intend to come back to it at a later date.
2017-08-16 16:42:41 -06:00
Geoff Brown
3160467cf1 Bug 1390599 - 3. Add --verify and --verify-max-time options to xpcshell test harness; r=jmaher
This adds test verification support to the xpcshell test harness. With --verify,
the specified test(s) are run 20 times, then another 20 times in chaos mode.

Tests are run sequentially. I have some interest in running in parallel also,
but this may not be practical: 1. Under normal circumstances, a test does not
run in parallel with itself, so it is arguably an unrealistic mode of operation;
2. Logging fails if it sees a test start after a test with the same name has completed.
2017-08-16 06:55:55 -06:00
Geoff Brown
34e5369daa Bug 1390599 - 2. Break xpcshell test harness runTests() function into smaller pieces; r=jmaher
New function updateMozinfo() is broken out of runTests() and the remainder of runTests()
is split into two parts: runTests() prepares tests, then calls new function runTestList() to
actually run them. All changes are structural and no change in behavior is expected.
2017-08-16 06:55:53 -06:00
Geoff Brown
e4e2fc78d1 Bug 1390599 - 1. Simplify argument passing in xpcshell test harness; r=jmaher
The complexity of the xpcshell test harness has grown over time. I am reluctant
to make it more complex without first trying to simplify it. Here I consolidate
some of the argument passing between functions in an attempt to simplify some
important interfaces. Changes are strictly structural and should result in no
change in behavior.
2017-08-15 09:06:16 -06:00
Masatoshi Kimura
f7fb96c7e5 Bug 1390106 - Stop using versioned scripts in tests. r=jmaher
MozReview-Commit-ID: ErqU4M1f7Oj

--HG--
extra : rebase_source : 968490c3f787949324c44ba75b6daf5c346f54c3
2017-08-14 20:46:55 +09:00
Masatoshi Kimura
8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Rajesh Kathiriya
48e6bc2124 Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G

--HG--
extra : rebase_source : b455e846ab79c8141150517e67e542e3e06d630e
2017-07-25 23:45:41 +05:30
Sebastian Hengst
804a36e668 Backed out changeset f5922a7ed25a (bug 1374620) for failing eslint at telemetry/tests/unit/test_TelemetrySend.js:358: ["os"] is better written in dot notation. r=backout 2017-07-31 14:44:34 +02:00
Rajesh Kathiriya
22dfa54ef4 Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G

--HG--
extra : rebase_source : 5992bdde34bcc2421350433bc8c1e498a6bba848
2017-07-25 23:45:41 +05:30
Nicholas Hurley
17f1c3bcb9 Bug 1367551 - Cancel pushes when we already have the item in cache. r=mayhemer,mcmanus
MozReview-Commit-ID: 24N0Jm85wcC

--HG--
extra : rebase_source : e3babc6e569ce723c1f35bd587bb5f0b59f79cfd
2017-06-28 10:34:55 -07:00
Mike de Boer
9b07b832b3 Bug 1380470 - Part 3 - Add add_task().skip() and add_task().only() for XPCShell unit tests. r=ahal
This suite already had `add_task.skip(aTask)` and `add_task.only(aTask)`
implemented, which required quite a bit more boilerplate code to get them right.
I removed this API in favor of `add_task(aTask).skip()` and `add_task(aTask).only()`
so that it's the same signature as Mochitest-browser and Mochitest-chrome.
I also noticed that `add_task` was defined twice, right above the other, which
was of course the latest version. I removed the latter.

MozReview-Commit-ID: BSCCXorzSlC

--HG--
extra : rebase_source : 9fe671baa357882258e1e94e47981185f37e246a
2017-07-18 15:07:38 +02:00
Haik Aftandilian
ce8f59e85d Bug 1380132 - Part 2 - Set MOZ_DEVELOPER_OBJ_DIR before launching Firefox. r=gps
MozReview-Commit-ID: CvSUt2KueHr

--HG--
extra : rebase_source : 7d621a1dc7ced33a2c00e906970401e152a70189
2017-07-12 17:01:56 -07:00
Andrew McCreight
1b0c3c5f57 Bug 1100635 - Fix strict warning in xpcshell/head.js. r=cmanchester+432261
MozReview-Commit-ID: 3KktUF0n5GB

--HG--
extra : rebase_source : 8a560a3ebc3ad56c6011c01c0b8df71184887af6
2017-06-16 15:30:47 -07:00
Nicholas Hurley
df3233b549 Bug 1368080 - Only remove pushed streams from cache when canceling the stream if the ids match. r=mcmanus
MozReview-Commit-ID: 5y0Aj6Bgk9u

--HG--
extra : rebase_source : 015352a4b0a87734afce856fcd7b424e96c6ede8
2017-06-28 10:29:34 -07:00
Andrew Halberstadt
76029cba99 Bug 1375173 - Fix bug preventing running xpcshell from ./mach test, r=jgraham
MozReview-Commit-ID: FxPAAP3r9k0

--HG--
extra : rebase_source : 12e607f9b5c7e95ed3c60223c8fc1ea2228f5083
2017-06-23 08:25:21 -04:00
Sebastian Hengst
e8d1af47bc Backed out changeset a0f804d0b487 (bug 1375173) for failing Windows taskcluster builds in selftest.py | XPCShellTestsTests.testAddTaskRunNextTest. r=backout on a CLOSED TREE 2017-06-23 19:08:42 +02:00
Andrew Halberstadt
4dc85c3032 Bug 1375173 - Fix bug preventing running xpcshell from ./mach test, r=jgraham
MozReview-Commit-ID: FxPAAP3r9k0

--HG--
extra : rebase_source : ef80d10b9ca9ae7930b30c2496f636d15d110930
2017-06-23 08:25:21 -04:00
Nathan Froyd
b28fcc5c4b Bug 1372670 - part 5 - add nsIThreadManager::spinEventLoopUntilEmpty; r=erahm,florian
A number of places in JS need to drain the current thread's event queue,
which cannot be done with nsIThreadManager::spinEventLoopUntil, since we
need to not wait for an incoming event when attempting to process one.
2017-06-21 12:59:28 -04:00
Nathan Froyd
27c58cf89f Bug 1372670 - part 3 - add spinEventLoopUntil to nsIThreadManager; r=erahm,florian 2017-06-21 12:59:28 -04:00
Andrew Halberstadt
801192a683 Bug 1373796 - Normalize xpcshell manifests in errorsummary, r=jgraham
MozReview-Commit-ID: It2HPXMuqLA

--HG--
extra : rebase_source : 5fa209652e5deb0e58e58b66a380f670ee2473de
2017-06-20 10:52:33 -04:00
Alex Gaynor
fb7715626d Bug 1370438 - The MOZ_DISABLE_CONTENT_SANDBOX environment variable now works on macOS and is used in the xpcshell tests; r=haik
This environment variable works on both Windows and Linux for force-disabling
the content sandbox, and now does so on macOS as well.

The xpcshell tests force disable the sandbox because they do things like bind()
sockets, which is not compatible with the content sandbox. This is needed now
because bug 1358223 was force upgrading the sandbox from level 0 (disabled) to
level 1 on beta channel, which caused breakage.

MozReview-Commit-ID: 5DGxtoDLp0C

--HG--
extra : rebase_source : 87edd138e8b711eace5cb8103c67feae0361e148
2017-06-07 15:30:09 -04:00
Geoff Brown
0da0034332 Bug 1367235 - Additional changes for eslint on testing/xpcshell; r=Standard8 2017-05-25 07:32:44 -06:00
Geoff Brown
6fe3dae59f Bug 1367235 - Enable eslint on testing/xpcshell - mechanical updates; r=Standard8 2017-05-25 07:32:42 -06:00
Mike Cooper
94879bdf84 Bug 1361578 - Remove SelfSupport, since it is obsoleted by shield-recipe-client. r=Gijs
MozReview-Commit-ID: 1FCqNa5wxZk

--HG--
extra : rebase_source : a7a20b4376ecaf2d4e91da27a7b7b32091f03dbd
2017-05-19 10:02:11 -07:00
Francois Marier
39b6d88744 Bug 1364959 - Clean up Safe Browsing preferences in tests. r=dimi
Remove the forbiddenURI pref which was removed in bug 1274893 as well
as browser.safebrowsing.enabled which got renamed in bug 1025965.

Set dummy URLs for all of the network endpoints.

MozReview-Commit-ID: Efk2fv6cC3g

--HG--
extra : rebase_source : 9fbb3eb0fa7f002fe24577a8a0870ec4d1b7cf31
2017-05-18 16:18:59 -07:00
Chris Manchester
dcb8101430 Bug 1337667 - Un-skip xpcshell selftests for stylo now that they're passing. r=jryans
MozReview-Commit-ID: JwvIhSkgNa4

--HG--
extra : rebase_source : cb19f6ae5bb4bb16b622e1f02e2efc22ea1686d4
2017-05-17 12:58:49 -07:00
Greg Mierzwinski
5d46e96825 Bug 1360667 - Change location of coverage collection in xpcshell. r=jmaher
MozReview-Commit-ID: EsA8hTKd15Y

--HG--
extra : rebase_source : 4f2e5bd8b2ecb6dee6b2b85f9687b62feb6c9531
2017-04-28 15:20:37 -04:00
Florian Queze
4b1556a5f2 Bug 1355056 - replace (function(args) { /* do stuff using this */ }).bind(this) with arrow functions, r=jaws. 2017-04-27 00:25:45 +02:00
Alex Gaynor
fcd28c5b2a Bug 1294641 - whitelist reads from the .app directory in the macOS sandbox r=froydnj,haik
This patch does a few things:
a) Adds the resources location from the .app directory to the read whitelist
b) When it's a non-packaged build, mach run (and various mach tests) set an environment variable for the repo location which we allow reads from.

r=haik,froydnj

MozReview-Commit-ID: KNvAoUs5Ati

--HG--
extra : rebase_source : 81ba8bfee0ca96979cf8e30d75cdd47f06bc10ea
2017-04-07 14:53:19 -04:00
Sebastian Hengst
e7317789ad Backed out changeset 225683fed1d1 (bug 1294641) for breaking crashtests, reftests and Windows builds. r=backout on a CLOSED TREE 2017-04-17 16:29:52 +02:00
Alex Gaynor
fd11319799 Bug 1294641 - whitelist reads from the .app directory in the macOS sandbox r=froydnj,haik
This patch does a few things:
a) Adds the resources location from the .app directory to the read whitelist
b) When it's a non-packaged build, mach run (and various mach tests) set an environment variable for the repo location which we allow reads from.

r=haik,froydnj

MozReview-Commit-ID: KNvAoUs5Ati

--HG--
extra : rebase_source : f637acff32fc8582732de932503dd696abc57877
2017-04-07 14:53:19 -04:00
Florian Queze
4c6a68d1c9 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Florian Queze
f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
159215e6f4 Backed out changeset 18d45aa984d6 (bug 1355161) 2017-04-14 23:39:23 +02:00