Граф коммитов

191 Коммитов

Автор SHA1 Сообщение Дата
Bevis Tseng 1ebeb1002b Bug 1333997 - Part 3: Add Test Coverage for Named NewRunnable APIs. r=froydnj
--HG--
extra : rebase_source : 7038228e2744072d1b64f903ab6ae9ca2f053bef
2017-02-07 16:45:45 +08:00
Carsten "Tomcat" Book 092e5dc5f1 merge mozilla-inbound to mozilla-central a=merge 2017-02-07 14:08:46 +01:00
Honza Bambas 3a39b6dbee Bug 1322825 - Incremental tokenizer. r=froydnj 2017-02-06 10:49:00 -05:00
Gerald Squelart 213ba5c515 Bug 1336215 - Optimize iterator if nsDeque is const - r=froydnj
Handling potential nsDeque size changes means a bit of extra work.

But if the nsDeque is const, we can assume that it shouldn't get modified, so
we can provide a more optimized iterator that doesn't need to handle size
changes.

Optimizing a range-for loop in which the deque is not modified, can be done
by writing: `for (void* item : const_cast<const nsDeque&>(deque)) {...}`

MozReview-Commit-ID: AFupjoTsoH3

--HG--
extra : rebase_source : a71b09c9cb73787ce686c7c762f92ef0c208e76a
2017-02-03 13:08:10 +11:00
Gerald Squelart dade4b9e6e Bug 1336215 - Make nsDeque::ConstIterator resistant to size changes - r=froydnj
Note that iterators stay at the same index if the deque size changes
(including end-iterators staying at the end).
This means that after front operations, iterators will effectively point at
different elements! (Possibly skipping or re-visiting some.)
But this is consistent with ForEach and hand-crafted index-based for loops.

MozReview-Commit-ID: 5IvazJR68dG

--HG--
extra : rebase_source : c574fd2d2642d784482698c0fc861269200d1059
2017-02-03 09:19:47 +11:00
Gerald Squelart d5ce43788f Bug 1322700 - Enable range-for with nsDeque - r=froydnj
It's now possible to write:
  for (void* item : deque) { ... }

MozReview-Commit-ID: FLoczCZd77y

--HG--
extra : rebase_source : 237293e94b478beb2bf352c1179d42c289dda145
2017-02-02 12:28:35 +11:00
Gian-Carlo Pascutto f004938bbb Bug 1330326 - Add Split() function on String classes. r=froydnj
MozReview-Commit-ID: 3xug2xMR60j

--HG--
extra : rebase_source : e39f37936f5b07411921b9875a85fd55241847be
2017-01-30 12:34:35 +01:00
Sebastian Hengst f679eaafc6 Backed out changeset 558774589f3e (bug 1330326) for Windows build bustage in nsTSubstring.h. r=backout on a CLOSED TREE 2017-01-27 21:00:49 +01:00
Gian-Carlo Pascutto 305eb7cc8b Bug 1330326 - Add Split() function on String classes. r=froydnj
MozReview-Commit-ID: 3xug2xMR60j

--HG--
extra : rebase_source : 60a9e37c2c7727eb6fbd69bfeee0f1292a0d880e
2017-01-24 12:07:00 +01:00
Nathan Froyd bc9b47a453 Bug 1276669 - part 5 - don't try to test NS_RegisterStaticAtoms; r=erahm
There are several XPCOM tests that purport to call
NS_RegisterStaticAtoms.  The tests located in the xpcom/tests/ directory
are unused, so we might as well just remove them.  The gtests do get
run, but there's going to be no way to test NS_RegisterStaticAtoms once
sealing the atom table actually means forbidding new additions.  So we
might as well remove the gtest too.
2017-01-26 15:43:39 -05:00
Benjamin Smedberg e56d1ab394 Bug 1332631 part H - move gtests from xpcom/glue to xpcom/tests, and unify the two TestThreadUtils.cpp into one file, r=froydnj
MozReview-Commit-ID: 2idOXKJOnuW

--HG--
rename : xpcom/glue/tests/gtest/TestArray.cpp => xpcom/tests/gtest/TestArray.cpp
rename : xpcom/glue/tests/gtest/TestGCPostBarriers.cpp => xpcom/tests/gtest/TestGCPostBarriers.cpp
rename : xpcom/glue/tests/gtest/TestNsDeque.cpp => xpcom/tests/gtest/TestNsDeque.cpp
extra : rebase_source : f5b3dc2f338c056e96c9fc42d9cdb4d2f7128116
extra : histedit_source : 9d85be5854af26a214aff4e1027415b9472e21a1
2017-01-20 15:22:23 -05:00
Markus Stange 692210bd80 Bug 1323100 - Assign names to all remaining threads that are created through NS_NewThread and create them using NS_NewNamedThread instead. r=froydnj
MozReview-Commit-ID: 7W1dt2BBKJZ

--HG--
extra : rebase_source : c7e335dac2e0f02782f0eb229a7181c8d01317a2
2016-12-21 11:43:50 +01:00
Ben Kelly 6db09bc23b Bug 1134372 P2 Verify that cloned pipe streams can be read at different rates. r=froydnj 2016-12-02 10:41:33 -08:00
Nathan Froyd 2ebbd09068 Bug 1320752 - remove mozilla/Function.h; r=gerald
We have std::function available now, which is likely to be somewhat more
efficient.
2016-11-28 11:03:53 -05:00
Nicholas Nethercote 7e1a8cf56c Bug 1315138 - gtestify storage/test/*.cpp. r=mak,erahm.
This change is mostly straightforward, except for the following.

- It removes all the printing from the do_check_* macros because gtest macros
  do appropriate printing.

- test_StatementCache.cpp needs some special gtest magic for the type
  parameterization.

- It merges the four tests in test_unlock_notify.cpp because they rely on being
  executed in order, and so aren't independent.

- storage_test_harness_tail.h is no longer necessary because gtest provides the
  test looping functionality.

- It uses #include and the preprocessor to remove the duplication between
  test_deadlock_detector.cpp and xpcom/tests/DeadlockDetector.cpp.

- It makes the test in test_service_init_background_thread.cpp a death test to
  force it to be the first storage gtest, because it fails otherwise.

- It adds code to undo the SQLite mutex hooking as necessary, so that tests
  don't interfere with each other.

- It de-virtualizes Spinner's destructor (as identified in bug 1318282).

--HG--
rename : storage/test/storage_test_harness.h => storage/test/gtest/storage_test_harness.h
rename : storage/test/test_AsXXX_helpers.cpp => storage/test/gtest/test_AsXXX_helpers.cpp
rename : storage/test/test_StatementCache.cpp => storage/test/gtest/test_StatementCache.cpp
rename : storage/test/test_asyncStatementExecution_transaction.cpp => storage/test/gtest/test_asyncStatementExecution_transaction.cpp
rename : storage/test/test_async_callbacks_with_spun_event_loops.cpp => storage/test/gtest/test_async_callbacks_with_spun_event_loops.cpp
rename : storage/test/test_binding_params.cpp => storage/test/gtest/test_binding_params.cpp
rename : storage/test/test_deadlock_detector.cpp => storage/test/gtest/test_deadlock_detector.cpp
rename : storage/test/test_file_perms.cpp => storage/test/gtest/test_file_perms.cpp
rename : storage/test/test_mutex.cpp => storage/test/gtest/test_mutex.cpp
rename : storage/test/test_service_init_background_thread.cpp => storage/test/gtest/test_service_init_background_thread.cpp
rename : storage/test/test_statement_scoper.cpp => storage/test/gtest/test_statement_scoper.cpp
rename : storage/test/test_transaction_helper.cpp => storage/test/gtest/test_transaction_helper.cpp
rename : storage/test/test_true_async.cpp => storage/test/gtest/test_true_async.cpp
rename : storage/test/test_unlock_notify.cpp => storage/test/gtest/test_unlock_notify.cpp
extra : rebase_source : dbb695c112564efa1945116be1a8435988982e74
2016-11-11 09:59:23 +11:00
Masatoshi Kimura 9c32f727eb Bug 1318857 - Unhide nsTSubstring_CharT::StripChars in nsTString_CharT. r=froydnj
MozReview-Commit-ID: CyQhH2y9lbm

--HG--
extra : rebase_source : d733decec808e7a74deefe149672ec4bdbc7f3f1
2016-11-20 00:53:37 +09:00
Andi-Bogdan Postelnicu a6f9209af4 Bug 1317954 - Use C++11's override and remove virtual where applicable in xpcom/. r=froydnj
MozReview-Commit-ID: 2XXoxNHYCKm

--HG--
extra : rebase_source : f4a144b706aa467a1cf713db57adcbefa40b8b96
2016-11-16 14:27:07 +02:00
Andi-Bogdan Postelnicu 60bb054c02 Bug 1317954 - Replace default bodies of special member functions with = default; in xpcom/. r=froydnj
MozReview-Commit-ID: 5GXchMr0VvV

--HG--
extra : rebase_source : ac32605ef643f67ffd0f0894f31eed8f01804e2f
2016-11-16 14:25:31 +02:00
Andi-Bogdan Postelnicu 42effb5bbf Bug 1317954 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in xpcom/. r=froydnj
MozReview-Commit-ID: EZZrYF1W81B

--HG--
extra : rebase_source : 30eea607d07ac819a0e55a2c4b0f8c359c156705
2016-11-16 14:24:59 +02:00
Andi-Bogdan Postelnicu d7f83a7ea6 Bug 1317954 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in xpcom/. r=froydnj
MozReview-Commit-ID: 9mKXvXyYa6U

--HG--
extra : rebase_source : 55f74f93829b52b2c347a62520a79ab867adca35
2016-11-16 14:24:21 +02:00
Michelangelo De Simone 47eb98d13a Bug 1317451 - ASSERT_DEATH replaced by ASSERT_DEATH_IF_SUPPORTED. r=froydnj
MozReview-Commit-ID: Auqwd0NlM17

--HG--
extra : rebase_source : 67a86926e1ddce38ec24f651c2cc79c6a872bc93
2016-11-13 11:12:49 -08:00
Eric Rahm 61de62099e Bug 1316193 - Fix unified bustage. r=me ON A CLOSED TREE
MozReview-Commit-ID: 4ylYi9LkwJm
2016-11-10 13:23:21 -08:00
Eric Rahm a79e2262d5 Bug 1316437 - Convert TestSTLWrappers to a gtest. r=bsmedberg
MozReview-Commit-ID: HRmnWvxyNP

--HG--
rename : xpcom/tests/TestSTLWrappers.cpp => xpcom/tests/gtest/TestSTLWrappers.cpp
2016-11-10 13:04:06 -08:00
Eric Rahm 07c557837c Bug 1316424 - Convert XPCOM test TestBase64 to a gtest. r=bsmedberg
MozReview-Commit-ID: 89kKMhkzwXK

--HG--
rename : xpcom/tests/TestBase64.cpp => xpcom/tests/gtest/TestBase64.cpp
2016-11-10 13:01:01 -08:00
Eric Rahm bf24d0b9f2 Bug 1316191 - Convert XPCOM test TestRacingServiceManager to a gtest. r=bsmedberg
MozReview-Commit-ID: QppJYYZrtT

--HG--
rename : xpcom/tests/TestRacingServiceManager.cpp => xpcom/tests/gtest/TestRacingServiceManager.cpp
2016-11-10 12:58:09 -08:00
Eric Rahm 07d602bad9 Bug 1316193 - Convert XPCOM test TestThreadPoolListener to a gtest. r=bsmedberg
MozReview-Commit-ID: JiyYTGGuKJo

--HG--
rename : xpcom/tests/TestThreadPoolListener.cpp => xpcom/tests/gtest/TestThreadPoolListener.cpp
2016-11-10 12:55:36 -08:00
Eric Rahm 416c229a90 Bug 1316189 - Convert XPCOM test TestCallTemplate to a gtest. r=bsmedberg
MozReview-Commit-ID: FGCmfjyKNa1

--HG--
rename : xpcom/tests/TestCallTemplates.cpp => xpcom/tests/gtest/TestCallTemplates.cpp
2016-11-10 12:50:43 -08:00
Eric Rahm a94c02e198 Bug 1313489 - Part 2: Convert DeadlockDetectorScalability to a gtest. r=froydnj
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:

> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*

MozReview-Commit-ID: 57rxjiZKjQ6

--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
2016-11-10 12:47:48 -08:00
Eric Rahm 64b21983e5 Bug 1313488 - Part 1: Convert XPCOM test TestDeadlockDetector to a gtest. r=froydnj
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.

MozReview-Commit-ID: 9Sl0hHBVGT3

--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
2016-11-10 12:47:23 -08:00
Eric Rahm 54a94346b1 Bug 1313488 - Part 0: Adding missing includes. r=froydnj
Add missing includes to fix unified builds.

MozReview-Commit-ID: 3xkozGdrdBf
2016-11-10 12:47:21 -08:00
Nathan Froyd 23c8029288 Bug 1316127 - add tests for edge cases for nsUnescapeCount; r=erahm
There are no tests for this piece of code otherwise, and it'd be good to
have cases for non-escape sequences of various flavors.
2016-11-10 23:11:31 -05:00
Sebastian Hengst 5df0c97c52 Backed out changeset d769f46c4248 (bug 1313488) for leak in Linux x64 debug. r=backout 2016-11-09 21:10:47 +01:00
Sebastian Hengst 1e466eed57 Backed out changeset deabf7bc6526 (bug 1313488)
--HG--
rename : xpcom/tests/gtest/TestDeadlockDetector.cpp => xpcom/tests/TestDeadlockDetector.cpp
2016-11-09 21:10:10 +01:00
Sebastian Hengst 9341b600b5 Backed out changeset 54098e53a584 (bug 1313489)
--HG--
rename : xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp => xpcom/tests/TestDeadlockDetectorScalability.cpp
2016-11-09 21:10:02 +01:00
Eric Rahm e7e98cc775 Bug 1313489 - Part 2: Convert DeadlockDetectorScalability to a gtest. r=froydnj
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:

> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*

MozReview-Commit-ID: 57rxjiZKjQ6

--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
2016-11-09 10:25:17 -08:00
Eric Rahm 1634281923 Bug 1313488 - Part 1: Convert XPCOM test TestDeadlockDetector to a gtest. r=froydnj
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.

MozReview-Commit-ID: 9Sl0hHBVGT3

--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
2016-11-09 10:24:58 -08:00
Eric Rahm 91cddc126f Bug 1313488 - Part 0: Adding missing includes. r=froydnj
Add missing includes to fix unified builds.

MozReview-Commit-ID: 3xkozGdrdBf
2016-11-09 10:24:56 -08:00
Eric Rahm 502d8d220a Bug 1313484 - Convert XPCOM test TestTimers to a gtest. r=froydnj
MozReview-Commit-ID: 8sH5fbvv9wZ

--HG--
rename : xpcom/tests/TestTimers.cpp => xpcom/tests/gtest/TestTimers.cpp
2016-11-09 10:23:43 -08:00
Phil Ringnalda 652fc04e1a Backed out 5 changesets (bug 1313489, bug 1313488, bug 1313484) in hopes that OS X will go back to building without complaining about missing symbols in nsIFileEnumerator
Backed out changeset 276b093c968f (bug 1313489)
Backed out changeset 5a062f72097d (bug 1313489)
Backed out changeset dbd9b56b50e7 (bug 1313488)
Backed out changeset 22e770047827 (bug 1313488)
Backed out changeset 6a7831fbca69 (bug 1313484)

MozReview-Commit-ID: KP9gk9o11co

--HG--
rename : xpcom/tests/gtest/TestDeadlockDetector.cpp => xpcom/tests/TestDeadlockDetector.cpp
rename : xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp => xpcom/tests/TestDeadlockDetectorScalability.cpp
rename : xpcom/tests/gtest/TestTimers.cpp => xpcom/tests/TestTimers.cpp
2016-11-07 19:12:13 -08:00
Eric Rahm 3162321eb2 Bug 1313489 - Part 2: Convert DeadlockDetectorScalability to a gtest. r=froydnj
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:

> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*

MozReview-Commit-ID: 57rxjiZKjQ6

--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
2016-11-07 14:27:20 -08:00
Eric Rahm d29d2d6fe0 Bug 1313488 - Part 1: Convert XPCOM test TestDeadlockDetector to a gtest. r=froydnj
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.

MozReview-Commit-ID: 9Sl0hHBVGT3

--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
2016-11-07 14:27:04 -08:00
Eric Rahm 3cea50d45d Bug 1313488 - Part 0: Adding missing includes. r=froydnj
Add missing includes to fix unified builds.

MozReview-Commit-ID: 3xkozGdrdBf
2016-11-07 14:27:03 -08:00
Eric Rahm cddb84eb44 Bug 1313484 - Convert XPCOM test TestTimers to a gtest. r=froydnj
MozReview-Commit-ID: 8sH5fbvv9wZ

--HG--
rename : xpcom/tests/TestTimers.cpp => xpcom/tests/gtest/TestTimers.cpp
2016-11-07 14:25:41 -08:00
Eric Rahm 72501ba9d6 Bug 1313483 - Convert XPCOM test TestThreadUtils to a gtest. r=froydnj
MozReview-Commit-ID: EA0SNRX2EXC

--HG--
rename : xpcom/tests/TestThreadUtils.cpp => xpcom/tests/gtest/TestThreadUtils.cpp
2016-11-04 16:24:59 -07:00
Eric Rahm f858baa31d Bug 1313482 - Convert XPCOM test TestTextFormatter to a gtest. r=froydnj
MozReview-Commit-ID: FQ5K3jvqb7c

--HG--
rename : xpcom/tests/TestTextFormatter.cpp => xpcom/tests/gtest/TestTextFormatter.cpp
2016-11-04 16:24:42 -07:00
Eric Rahm c4ab361b4f Bug 1313481 - Convert XPCOM test TestTArray to a gtest. r=froydnj
MozReview-Commit-ID: 8fB9Wi9ghD0

--HG--
rename : xpcom/tests/TestTArray.cpp => xpcom/tests/gtest/TestTArray2.cpp
2016-11-04 16:24:27 -07:00
Eric Rahm c4d14d9414 Bug 1313479 - Part 2: Expand and split out TestObserverService tests. r=froydnj
This splits out enumertion testing, adds testing of weak references, and other
basic tests for add and remove functions.

MozReview-Commit-ID: CLEafPJhe3z
2016-11-04 16:24:00 -07:00
Eric Rahm b6fc8d17a4 Bug 1313479 - Part 1: Convert TestObserverService to a gtest. r=froydnj
This is a straightforward conversion to a gtest. The test itself is updated
to use RefPtr/nsCOMPtr where appropriate to avoid memory leaks.

MozReview-Commit-ID: JyHF3iTaoOg

--HG--
rename : xpcom/tests/TestObserverService.cpp => xpcom/tests/gtest/TestObserverService.cpp
2016-11-04 16:23:58 -07:00
Eric Rahm 0903b48439 Bug 1313479 - Part 0-1: Add missing includes to unified gtests. r=froydnj
MozReview-Commit-ID: 4KVwMQJcAIS
2016-11-04 16:23:57 -07:00
Eric Rahm d021c055ec Bug 1313477 - Convert XPCOM test TestObserverArray to a gtest. r=froydnj
This is a very straightforward conversion of TestObserverArray. The tests were
not split out as they are all dependent on each other. The test macro was left
as well as converting it to a proper function would require a fair amount of
modification to the tests.

MozReview-Commit-ID: Bz9aWbAwBS

--HG--
rename : xpcom/tests/TestObserverArray.cpp => xpcom/tests/gtest/TestObserverArray.cpp
2016-11-04 16:23:38 -07:00