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

1856 Коммитов

Автор SHA1 Сообщение Дата
David Major 40f4821701 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
David Major af163b2b51 Bug 1346099: Fix a typo in the string splitter. r=dbaron
This just-so-happened to work because nobody refers to the splitter directly by name.

The added gtest doesn't actually prove that this patch fixes anything, but I figured we could use a wide string for good measure.

MozReview-Commit-ID: 1ADy4X44HO1
2017-03-13 11:19:49 +13:00
Dan Minor d6eb4d1229 Bug 1343557 - Make operator AutoCreateAndDestroyReentrantMonitor::ReentrantMonitor* const; r=bsmedberg
MozReview-Commit-ID: Fy3k5fvEs5J

--HG--
extra : rebase_source : 52b9939a66bc828ca2609921300026b65d54f8e5
2017-03-02 08:57:54 -05:00
Eric Rahm 3bec954d62 Bug 792209 - Remove nsISupportsArray. r=froydnj
MozReview-Commit-ID: G28VUoYj9Wj
2016-11-17 11:45:41 -08:00
Wes Kocher 8c4ce17711 Merge inbound to m-c a=merge
MozReview-Commit-ID: DCUf7VEDrTt
2017-02-17 13:38:51 -08:00
Honza Bambas af9b0f549f Bug 1340260 - Fix gtest Werror build bustage on a CLOSED TREE. 2017-02-17 12:35:59 -05:00
Honza Bambas 5d95d03e70 Bug 1340260 - Fix potentially wrong string returned from Tokenizer::ReadUntil, keep Record/Claim work after ReadUntil. r=froydnj
--HG--
extra : rebase_source : 1029f9b6743085b7865554fdedc1c96e9239b13a
2017-02-17 08:13:00 -05:00
Tom Tromey b18d4c7b9e Bug 1060419 - make TestPipes.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: LMFNBYVoJZf

--HG--
extra : rebase_source : fb47a1aaf1371797cdd131f9157f8fd1d8f06e26
2016-12-09 10:53:35 -10:00
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
Chris Manchester 0aa1979e85 Bug 1333135 - Install test programs from xpcom/tests with moz.build rather than Makefile.in. r=mshal
MozReview-Commit-ID: AeJHDn2znAk

--HG--
extra : rebase_source : 81cbc9e0231668e3cdee9f5579dbbe6a48374b97
2017-01-27 13:57:04 -08:00
Sebastian Hengst 6d37374553 Backed out changeset aff814e1eebb (bug 1333135) for Linux pgo bustage (doesn't know how to make TestArguments). r=backout on a CLOSED TREE 2017-01-30 20:11:05 +01:00
Chris Manchester e8c94ac70b Bug 1333135 - Install test programs from xpcom/tests with moz.build rather than Makefile.in. r=mshal
MozReview-Commit-ID: AeJHDn2znAk

--HG--
extra : rebase_source : 59ce9a95b047db97e4ab42b7f75587fbb0a6c4c9
2017-01-27 13:57:04 -08: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
Geoff Brown 7a0a9ab067 Bug 1325609 - Skip test_nsIProcess.js on linux, for frequent timeouts; r=me 2017-01-26 09:46:47 -07: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
Benjamin Smedberg d51a4c7205 Bug 1332631 part A - remove two files which aren't referenced or used, r=froydnj
MozReview-Commit-ID: GIqIvpWZ9Jd

--HG--
extra : rebase_source : 217be3e6d634812a1c99cf929e97cf5e7a83a004
extra : histedit_source : 12c6acadc63a8f5baf6a71604d3d9ed83dd07f8d
2017-01-20 10:48:53 -05:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00: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
Ting-Yu Chou 5f4802bf0b Bug 1322465 part 15 - Use explicit/MOZ_IMPLICIT for the unary constructors in xpcom/. r=bobowen,Ehsan
MozReview-Commit-ID: JtmtNbPwNOg

--HG--
extra : rebase_source : f877b0504c7106a0874b23b8cfc0eab12d610767
2016-12-16 16:01:11 +08: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
Ryan VanderMeulen c2e0dbedb5 Merge m-c to inbound. a=merge 2016-11-18 15:48:29 -05:00
Ehsan Akhgari 5914626c41 Bug 1318678 - Use libmfbt instead of libmozglue 2016-11-18 13:11:00 -05:00
Ehsan Akhgari 34114d2517 Bug 1318678 - Fix linking TestBlockingProgram on OSX after bug 1317638 landed 2016-11-18 13:03:18 -05: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 be53fc59dd Bug 1317954 - Replace string literals containing escaped characters with raw string literals in xpcom/. r=froydnj
MozReview-Commit-ID: INLv2bNrLYX

--HG--
extra : rebase_source : 99d516e153b2dcb5185b30ee6072c4e6575517b7
2016-11-16 14:26:03 +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
James Cheng c1ca1ea63f Bug 1317638 - Fix build fail in TestBlockingProcess.cpp if enabling warnings as errors. r=erahm
MozReview-Commit-ID: AChdrrdhf4Z

--HG--
extra : rebase_source : 3aab53ea08a0c6699f963b32e1f896cb13d02359
2016-11-15 16:33:59 +08:00
Benjamin Smedberg 58606875d8 Bug 1314955 part B - Remove the tests for binary-component which is no longer supported. r=froydnj
MozReview-Commit-ID: G7MATc8AGt1

--HG--
extra : rebase_source : f5f0886aab2b6981a12d9c32b120e65a2d022bc8
extra : source : a99c6ce96b6f25a4935bc41fe32841c9b94f1546
2016-10-26 11:34:32 -04:00
Iris Hsiao 66ac15df36 Backed out changeset a99c6ce96b6f (bug 1314955) 2016-11-16 15:19:42 +08:00
Benjamin Smedberg 89ac51de41 Bug 1314955 part B - Remove the tests for binary-component which is no longer supported. r=froydnj
MozReview-Commit-ID: G7MATc8AGt1

--HG--
extra : rebase_source : e83168f601f5dde167227ed5df502be54ba252fc
2016-10-26 11:34:32 -04:00
Carsten "Tomcat" Book 8cfa5253e8 merge mozilla-inbound to mozilla-central a=merge 2016-11-15 12:26:41 +01: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 fa2367d041 Bug 1316732 - Remove TestMinStringAPI. r=bsmedberg
This GeckoSimpleProgram is not run and tests a feature we're removing.

MozReview-Commit-ID: FWZdQTZchf3
2016-11-14 11:33:47 -08:00
Eric Rahm 3fa6be1ab6 Bug 1316904 - Convert windows XPCOM tests to gtest. r=froydnj
This converts TestNtPathToDosPath and TestCOM to gtests.

MozReview-Commit-ID: EeNwvsj4cAs
2016-11-11 12:02:52 -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 59b65be14f Bug 1316436 - Remove NSPR dependency from TestBlockingProcess.cpp. r=bsmedberg
MozReview-Commit-ID: y1NuXrwEr9
2016-11-10 13:02:03 -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 1f55e2d522 Bug 1316195 - Remove XPCOM test TestRegistrationOrder. r=bsmedberg
MozReview-Commit-ID: 2CLSKxNukVj
2016-11-10 12:59:56 -08:00
Eric Rahm 59373784d1 Bug 1316194 - Remove unused XPCOM test TestINIParser. r=bsmedberg
MozReview-Commit-ID: 2gQgR6V3kee
2016-11-10 12:59:20 -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 bdcf82a40b Bug 1313489 - Part 1: Remove dead code. r=froydnj
MozReview-Commit-ID: HSS4Sf7O1I6
2016-11-10 12:47:47 -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 e4f364202e Backed out changeset 7b0acef284ad (bug 1313489) 2016-11-09 21:10:06 +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 348457dcac Bug 1315830 - Remove unused nsIFileEnumerator program. r=froydnj
This seems to have been added back in 2000 as some sort of ad-hoc nsIFile test.
There is now an actual gtest for nsIFile so this should be safe to remove.

MozReview-Commit-ID: DMeVmBNmf8f
2016-11-09 10:33:17 -08: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 c0f8aff99b Bug 1313489 - Part 1: Remove dead code. r=froydnj
MozReview-Commit-ID: HSS4Sf7O1I6
2016-11-09 10:25:15 -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 2faeed6d55 Bug 1313485 - Convert XPCOM test TestJemalloc to a gtest. r=njn
MozReview-Commit-ID: 5yzn8o33Ne5

--HG--
rename : xpcom/tests/TestJemalloc.cpp => memory/gtest/TestJemalloc.cpp
2016-11-09 10:24:22 -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
Eric Rahm 6ee0d39aef Bug 1316184 - Make SimplePrograms that need XUL GeckoSimplePrograms. r=froydnj 2016-11-08 16:15:34 -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
Sebastian Hengst 193fc03fc6 Backed out changeset 1b545e55e42a (bug 1313485) for bustage. r=backout
--HG--
rename : memory/gtest/TestJemalloc.cpp => xpcom/tests/TestJemalloc.cpp
2016-11-07 23:46:09 +01: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 e1ab61c934 Bug 1313489 - Part 1: Remove dead code. r=froydnj
MozReview-Commit-ID: HSS4Sf7O1I6
2016-11-07 14:27:18 -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 52ba7f5179 Bug 1313485 - Convert XPCOM test TestJemalloc to a gtest. r=njn
MozReview-Commit-ID: 5yzn8o33Ne5

--HG--
rename : xpcom/tests/TestJemalloc.cpp => memory/gtest/TestJemalloc.cpp
2016-11-07 14:26:25 -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
Phil Ringnalda a7bc94158c Merge m-i to m-c, a=merge
MozReview-Commit-ID: H4VKCYDq5cD

--HG--
rename : xpcom/tests/TestAutoRef.cpp => xpcom/tests/gtest/TestAutoRef.cpp
rename : xpcom/tests/TestCOMArray.cpp => xpcom/tests/gtest/TestCOMArray.cpp
rename : xpcom/tests/TestCOMPtr.cpp => xpcom/tests/gtest/TestCOMPtr.cpp
rename : xpcom/tests/TestCOMPtrEq.cpp => xpcom/tests/gtest/TestCOMPtrEq.cpp
rename : xpcom/tests/TestFile.cpp => xpcom/tests/gtest/TestFile.cpp
rename : xpcom/tests/TestHashtables.cpp => xpcom/tests/gtest/TestHashtables.cpp
rename : xpcom/tests/TestID.cpp => xpcom/tests/gtest/TestID.cpp
2016-11-05 13:36:25 -07:00
Sebastian Hengst e3ad4a1224 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: xpcom. r=RyanVM
MozReview-Commit-ID: DUdntLdSp06

--HG--
extra : rebase_source : 9d4e380bc855e214d1863fb21af956183daad48a
2016-11-05 11:29:22 +01: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 95240c203d Bug 1313480 - Remove test TestStringAPI. r=froydnj
Once the xpcom glue library is removed we will no longer need an external
StringAPI, so this test can go away.

MozReview-Commit-ID: DdGV2dWvlK1
2016-11-04 16:24:15 -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 a25afbd5ae Bug 1313479 - Part 0: Cleanup indentation. r=froydnj
MozReview-Commit-ID: 7PAMbXHB5Ws
2016-11-04 16:23:55 -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
Eric Rahm caff0efb46 Bug 1313475 - Part 2: Convert TestNsRefPtr to a gtest. r=froydnj
This converts the tests over to gtests.

MozReview-Commit-ID: 3oXY9kUZdB6

--HG--
rename : xpcom/tests/TestNsRefPtr.cpp => xpcom/tests/gtest/TestNsRefPtr.cpp
2016-11-04 16:23:23 -07:00
Eric Rahm 3b6db52f8b Bug 1313475 - Part 1: Split out test functions. r=froydnj
MozReview-Commit-ID: EHmr48RpGq0
2016-11-04 16:23:22 -07:00
Eric Rahm 2d999d3cd0 Bug 1313475 - Part 0: Cleanup indentation. r=froydnj
MozReview-Commit-ID: 9BKCOxDZpBk
2016-11-04 16:23:21 -07:00
Eric Rahm eed887ecb5 Bug 1313474 - Convert XPCOM test TestID to a gtest. r=froydnj
MozReview-Commit-ID: 7rLi2Y9lYEI

--HG--
rename : xpcom/tests/TestID.cpp => xpcom/tests/gtest/TestID.cpp
2016-11-04 16:23:08 -07:00
Eric Rahm 962506ea53 Bug 1313473 - Part 2: Convert XPCOM test TestHashtables to a gtest. r=froydnj
MozReview-Commit-ID: DTOeKiesYBP

--HG--
rename : xpcom/tests/TestHashtables.cpp => xpcom/tests/gtest/TestHashtables.cpp
2016-10-31 16:58:42 -07:00
Eric Rahm 0a6bf97fca Bug 1313473 - Part 1: Split out test functions. r=froydnj
MozReview-Commit-ID: 4A0JgxyXWPz
2016-10-31 16:34:24 -07:00
Eric Rahm 84a7d935e9 Bug 1313472 - Part 1: Convert XPCOM test TestFile to a gtest. r=froydnj
This is a very straightforward conversion of TestFile to a gtest. It sticks
with using one main test function to avoid dealing with possible dependency
issues between subtests.

MozReview-Commit-ID: IoIeGgisMGE

--HG--
rename : xpcom/tests/TestFile.cpp => xpcom/tests/gtest/TestFile.cpp
2016-11-04 16:22:43 -07:00
Eric Rahm 07a4fa7730 Bug 1313472 - Part 0: Cleanup indentation. r=froydnj
MozReview-Commit-ID: 8LrPZNELGkJ
2016-11-04 16:22:41 -07:00
Eric Rahm 95aaba6075 Bug 1313471 - Part 2: Convert TestCOMPtrEq to a gtest. r=froydnj
MozReview-Commit-ID: GifbCK1zzxh

--HG--
rename : xpcom/tests/TestCOMPtrEq.cpp => xpcom/tests/gtest/TestCOMPtrEq.cpp
2016-11-04 16:22:29 -07:00
Eric Rahm 3ea2b4d54f Bug 1313471 - Part 1: Remove dead code. r=froydnj
MozReview-Commit-ID: FzGVmd0LO73
2016-11-04 16:22:28 -07:00
Eric Rahm 3a98aea28d Bug 1313470 - Part 2: Convert TestCOMPtr to a gtest. r=froydnj
MozReview-Commit-ID: HfcLTmvkRc8

--HG--
rename : xpcom/tests/TestCOMPtr.cpp => xpcom/tests/gtest/TestCOMPtr.cpp
2016-11-04 16:22:14 -07:00
Eric Rahm 5eb4e3e106 Bug 1313470 - Part 1: Split out test functions. r=froydnj
This just splits out test functions, no logic is changed.

MozReview-Commit-ID: EjGYyUjf1b2
2016-11-04 16:22:12 -07:00
Eric Rahm 42e86206df Bug 1313470 - Part 0: Cleanup indentation. r=froydnj
This is just whitespace changes with a few minor deletions.

MozReview-Commit-ID: A7fpHLqt5fU
2016-11-04 16:22:11 -07:00
Eric Rahm 63cd7f256f Bug 1313469 - Part 2: Convert TestCOMArray to a gtest. r=froydnj
MozReview-Commit-ID: CEhXX60lpZ8

--HG--
rename : xpcom/tests/TestCOMArray.cpp => xpcom/tests/gtest/TestCOMArray.cpp
2016-11-04 16:21:59 -07:00
Eric Rahm 63521114a3 Bug 1313469 - Part 1: Split out test functions. r=froydnj
This just splits out the test functions, no logic is changed.

MozReview-Commit-ID: KjUA9rQ7iOS
2016-11-04 16:21:58 -07:00
Eric Rahm c2b108ce95 Bug 1313468: Convert XPCOM test TestAutoRef to a gtest. r=froydnj
MozReview-Commit-ID: GkEPSkzNeuB

--HG--
rename : xpcom/tests/TestAutoRef.cpp => xpcom/tests/gtest/TestAutoRef.cpp
2016-11-04 16:21:37 -07:00
Eric Rahm c7e1364869 Bug 1313467 - Part 4: Convert TestAutoPtr to a gtest. r=froydnj
MozReview-Commit-ID: EOKHAQyZ4fZ

--HG--
rename : xpcom/tests/TestAutoPtr.cpp => xpcom/tests/gtest/TestAutoPtr.cpp
2016-11-04 11:13:58 -07:00
Eric Rahm f7eeed4c07 Bug 1313467 - Part 3: Cleanup the formatting of the rest of the file. r=froydnj
MozReview-Commit-ID: AfMDPcBjf3Y
2016-11-04 11:13:56 -07:00
Eric Rahm f4fdee3210 Bug 1313467 - Part 2: Move tests into individual functions. r=froydnj
This just moves code into separate functions. No logic changes were made.

MozReview-Commit-ID: 98NqhCb4T67
2016-11-04 11:13:55 -07:00
Eric Rahm 5672d02d4b Bug 1313467 - Part 1: Remove RefPtr tests from TestAutoPtr. r=froydnj
This is a test for nsAutoPtr, we shouldn't be testing RefPtr here.

MozReview-Commit-ID: IqwgINAuYar
2016-11-04 11:13:54 -07:00
Eric Rahm 491422bbde Bug 1313466 - Remove XPCOM test ShowAlignments. r=froydnj
MozReview-Commit-ID: 9FpMhw2MsjH
2016-11-04 11:13:25 -07:00
Phil Ringnalda c0dcc76ef6 Backed out 18 changesets (bug 1313469, bug 1313468, bug 1313474, bug 1313472, bug 1313473, bug 1313470, bug 1313471, bug 1313467, bug 1313466) for OS X gtest crashes
CLOSED TREE

Backed out changeset 5b5686e1bcd1 (bug 1313474)
Backed out changeset e8d20bdd13d4 (bug 1313473)
Backed out changeset 643bdd25166e (bug 1313473)
Backed out changeset 9a33c84ab30a (bug 1313472)
Backed out changeset 4d84926813e9 (bug 1313472)
Backed out changeset c85e7a7a5a99 (bug 1313471)
Backed out changeset 5d82bc9436ab (bug 1313471)
Backed out changeset 00f7b342bb29 (bug 1313470)
Backed out changeset f012923cfd8b (bug 1313470)
Backed out changeset e7d5b8135ae6 (bug 1313470)
Backed out changeset 82bf00ff6505 (bug 1313469)
Backed out changeset 5364fc8db9b0 (bug 1313469)
Backed out changeset 02959aa60196 (bug 1313468)
Backed out changeset 3c25a6ed5914 (bug 1313467)
Backed out changeset 0acc0a131101 (bug 1313467)
Backed out changeset 6fae1bbd3819 (bug 1313467)
Backed out changeset 107eb264a40d (bug 1313467)
Backed out changeset 9b60e295a885 (bug 1313466)

MozReview-Commit-ID: IKsAZxBYMfv

--HG--
rename : xpcom/tests/gtest/TestAutoPtr.cpp => xpcom/tests/TestAutoPtr.cpp
rename : xpcom/tests/gtest/TestAutoRef.cpp => xpcom/tests/TestAutoRef.cpp
rename : xpcom/tests/gtest/TestCOMArray.cpp => xpcom/tests/TestCOMArray.cpp
rename : xpcom/tests/gtest/TestCOMPtr.cpp => xpcom/tests/TestCOMPtr.cpp
rename : xpcom/tests/gtest/TestCOMPtrEq.cpp => xpcom/tests/TestCOMPtrEq.cpp
rename : xpcom/tests/gtest/TestFile.cpp => xpcom/tests/TestFile.cpp
rename : xpcom/tests/gtest/TestHashtables.cpp => xpcom/tests/TestHashtables.cpp
rename : xpcom/tests/gtest/TestID.cpp => xpcom/tests/TestID.cpp
2016-11-03 23:00:47 -07:00
Eric Rahm 6da13d0163 Bug 1313474 - Convert XPCOM test TestID to a gtest. r=froydnj
MozReview-Commit-ID: 7rLi2Y9lYEI

--HG--
rename : xpcom/tests/TestID.cpp => xpcom/tests/gtest/TestID.cpp
2016-11-03 17:56:02 -07:00
Eric Rahm 2f5b6bf1e3 Bug 1313473 - Part 2: Convert XPCOM test TestHashtables to a gtest. r=froydnj
MozReview-Commit-ID: DTOeKiesYBP

--HG--
rename : xpcom/tests/TestHashtables.cpp => xpcom/tests/gtest/TestHashtables.cpp
2016-10-31 16:58:42 -07:00
Eric Rahm c3422371de Bug 1313473 - Part 1: Split out test functions. r=froydnj
MozReview-Commit-ID: 4A0JgxyXWPz
2016-10-31 16:34:24 -07:00
Eric Rahm 09cf3af3b2 Bug 1313472 - Part 1: Convert XPCOM test TestFile to a gtest. r=froydnj
This is a very straightforward conversion of TestFile to a gtest. It sticks
with using one main test function to avoid dealing with possible dependency
issues between subtests.

MozReview-Commit-ID: IoIeGgisMGE

--HG--
rename : xpcom/tests/TestFile.cpp => xpcom/tests/gtest/TestFile.cpp
2016-11-03 17:55:30 -07:00
Eric Rahm fac3abb865 Bug 1313472 - Part 0: Cleanup indentation. r=froydnj
MozReview-Commit-ID: 8LrPZNELGkJ
2016-11-03 17:55:29 -07:00
Eric Rahm 9c2e2af38c Bug 1313471 - Part 2: Convert TestCOMPtrEq to a gtest. r=froydnj
MozReview-Commit-ID: GifbCK1zzxh

--HG--
rename : xpcom/tests/TestCOMPtrEq.cpp => xpcom/tests/gtest/TestCOMPtrEq.cpp
2016-11-03 17:55:28 -07:00
Eric Rahm eab5b6b405 Bug 1313471 - Part 1: Remove dead code. r=froydnj
MozReview-Commit-ID: FzGVmd0LO73
2016-11-03 17:55:26 -07:00
Eric Rahm 6a05e61ed8 Bug 1313470 - Part 2: Convert TestCOMPtr to a gtest. r=froydnj
MozReview-Commit-ID: HfcLTmvkRc8

--HG--
rename : xpcom/tests/TestCOMPtr.cpp => xpcom/tests/gtest/TestCOMPtr.cpp
2016-11-03 17:55:25 -07:00
Eric Rahm c15570e9d7 Bug 1313470 - Part 1: Split out test functions. r=froydnj
This just splits out test functions, no logic is changed.

MozReview-Commit-ID: EjGYyUjf1b2
2016-11-03 17:55:24 -07:00
Eric Rahm 2b3f5930cb Bug 1313470 - Part 0: Cleanup indentation. r=froydnj
This is just whitespace changes with a few minor deletions.

MozReview-Commit-ID: A7fpHLqt5fU
2016-11-03 17:55:22 -07:00
Eric Rahm a20fe79aec Bug 1313469 - Part 2: Convert TestCOMArray to a gtest. r=froydnj
MozReview-Commit-ID: CEhXX60lpZ8

--HG--
rename : xpcom/tests/TestCOMArray.cpp => xpcom/tests/gtest/TestCOMArray.cpp
2016-11-03 17:55:21 -07:00
Eric Rahm feb303e87f Bug 1313469 - Part 1: Split out test functions. r=froydnj
This just splits out the test functions, no logic is changed.

MozReview-Commit-ID: KjUA9rQ7iOS
2016-11-03 17:55:20 -07:00
Eric Rahm aea4240774 Bug 1313468: Convert XPCOM test TestAutoRef to a gtest. r=froydnj
MozReview-Commit-ID: GkEPSkzNeuB

--HG--
rename : xpcom/tests/TestAutoRef.cpp => xpcom/tests/gtest/TestAutoRef.cpp
2016-11-03 17:55:16 -07:00
Eric Rahm de9486a254 Bug 1313467 - Part 4: Convert TestAutoPtr to a gtest. r=froydnj
MozReview-Commit-ID: EOKHAQyZ4fZ

--HG--
rename : xpcom/tests/TestAutoPtr.cpp => xpcom/tests/gtest/TestAutoPtr.cpp
2016-11-03 17:49:01 -07:00
Eric Rahm a7b2c53840 Bug 1313467 - Part 3: Cleanup the formatting of the rest of the file. r=froydnj
MozReview-Commit-ID: AfMDPcBjf3Y
2016-11-03 17:48:17 -07:00
Eric Rahm d99dcde62e Bug 1313467 - Part 2: Move tests into individual functions. r=froydnj
This just moves code into separate functions. No logic changes were made.

MozReview-Commit-ID: 98NqhCb4T67
2016-11-03 17:48:16 -07:00
Eric Rahm 1c09ee8cf0 Bug 1313467 - Part 1: Remove RefPtr tests from TestAutoPtr. r=froydnj
This is a test for nsAutoPtr, we shouldn't be testing RefPtr here.

MozReview-Commit-ID: IqwgINAuYar
2016-11-03 17:48:14 -07:00
Eric Rahm 7662f973fd Bug 1313466 - Remove XPCOM test ShowAlignments. r=froydnj
MozReview-Commit-ID: 9FpMhw2MsjH
2016-11-03 17:48:13 -07:00
Eric Rahm ea799cdb96 Bug 1311191 - Part 1: Add nsISupportsArray-like iteration to nsArray. r=froydnj
This adds an intermediate interface, nsIArrayExtensions, that inherits from
nsIArray. This is necessary as nsISupportsArray implements nsIArray as well
so the methods could not just be addded to nsIArray. nsIMutableArray inherits
from nsIArrayExtensions and so any interface that works with an nsIMutableArray
can be updated to return an nsIArrayExtensions.

This will allow interfaces that currently return an nsISupportsArray to instead
return an nsIArrayExtensions and internally work with an nsIMutableArray.
Consumers of these functions will continue to be able to use
nsISupportsArray-like iteration even though they're now working with an
nsIArray.

MozReview-Commit-ID: 9uRjsJbg9Jp
2016-10-24 13:24:26 -07:00
Eric Rahm 3ee733ccd7 Bug 1310040 - Make nsSupportsArray implement nsIArray. r=froydnj
This makes nsSupportsArray implement the |nsIArray| interface. This will allow
us to replace references to nsISupportsArray as a param in our gecko interfaces
with nsIArray instead.

The goal is to remove this adapter (and nsISupportsArray) after a full release
cycle.

MozReview-Commit-ID: If7RiO5muIk
2016-10-18 11:52:08 -07:00
Chris Peterson 69596fd26b Bug 1309462 - Replace MOZ_ASSERT with MOZ_RELEASE_ASSERT in xpcom/tests/. r=froydnj 2016-10-12 19:40:45 -07:00
Tom Tromey 7bc8491bea Bug 1067547 - unify ScopedLogging implementations and use in nsEmbedFunctions; r=bsmedberg
MozReview-Commit-ID: 6hDZDaBsNFM

--HG--
extra : rebase_source : 9422c235ebdffd84e06137bb2c63ce106cb39f0b
2016-09-26 11:06:38 -06:00
Gijs Kruitbosch 926b56b96c Bug 1279240 - move path parsing of commandline handlers for mimetypes/protocols to nsILocalFileWin, r=froydnj
MozReview-Commit-ID: 4CENm3iqGUH

--HG--
extra : rebase_source : 2e208aa73d4c9d6827a11e3ef73fdeca6ed4a348
2016-09-30 17:18:41 +01:00
Wes Kocher 485474bedb Backed out 3 changesets (bug 1279240) for leaks on Windows VM mochitests a=backout
Backed out changeset 4b69e32e3a83 (bug 1279240)
Backed out changeset d0d5180dc062 (bug 1279240)
Backed out changeset dc1b725b47d4 (bug 1279240)
2016-09-29 17:44:41 -07:00
Gijs Kruitbosch c85dd42c4b Bug 1279240 - move path parsing of commandline handlers for mimetypes/protocols to nsILocalFileWin, r=froydnj
MozReview-Commit-ID: 4CENm3iqGUH

--HG--
extra : rebase_source : f9932abcee9f923b58e964ade81f3428181707d5
2016-09-27 11:51:43 +01:00
Byron Campen [:bwc] f6af4a9282 Bug 1157323 - Part 1: Make TestTimers a unit-test. r=froydnj
MozReview-Commit-ID: HPdP3muvzU8

--HG--
extra : rebase_source : a4728b9a4fdf1b1de354c04351d35dfb58edf693
2016-06-23 17:05:40 -05:00
Andrea Marchesini d62e084ce0 Bug 1288997 - memory blob should not be shared across processes - part 2 - SlicedInputStream, r=froydnj 2016-07-25 22:41:02 +02:00
Eric Rahm 395fa9e2ed Bug 1301742 - Improve UTF-16 to UTF-8 conversion speed. r=froydnj
This adds an SSE2 optimized path for UTF-16 strings that can be trivially
converted to UTF-8 (they contain no characters > 0X7F). It has a
speedup for the case where many of the leading characters are < 0X80 and
should have the same performance in the worst-case scenario where the first
character is > 0X7F.
2016-09-15 15:46:29 -07:00
Ben Kelly f0d440f9d1 Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-13 20:12:15 -07:00
Wes Kocher 42f4e48aee Backed out 6 changesets (bug 1300118) for frequent Windows VM Xpcshell failures a=backout CLOSED TREE
Backed out changeset 24f714ad248c (bug 1300118)
Backed out changeset 6fe61ed092e8 (bug 1300118)
Backed out changeset dd18e29b64bf (bug 1300118)
Backed out changeset 50882fb40551 (bug 1300118)
Backed out changeset 60e82c1780e5 (bug 1300118)
Backed out changeset e40df52925d5 (bug 1300118)

--HG--
extra : amend_source : 7475f45d827654abe309696d73fd86e75a497c32
2016-09-12 16:34:41 -07:00
Ben Kelly 621f6bacd6 Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-12 12:32:20 -07:00
Ben Kelly a8a4ae3c4f Backout rev 5c7368370ff9 to 980659720b86 (bug 1300118 and bug 1300658) for incorrect bug number in commit message. r=me 2016-09-12 12:29:17 -07:00
Ben Kelly 157b0fe1ed Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-12 11:21:01 -07:00
Michael Layzell 36e08437d0 Bug 1018486 - Part 8: Various other changes, r=smaug
MozReview-Commit-ID: B0dsomkWgEk
2016-09-07 10:50:45 -04:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Chris Manchester b0b84a1928 Bug 1240134 - Incorporate the interfaces.xpt from downloaded artifacts instead of building XPIDL during an artifact build. r=glandium
MozReview-Commit-ID: 8oEyS1xLOwV
2016-08-17 15:02:31 -07:00
Nathan Froyd 114e020c41 Bug 1294809 - remove cppunittest TestPipe; r=erahm
We have TestPipes gtests that does the same thing (see the TestPipe2
function and callers) as this test.
2016-08-15 21:31:04 -04:00
Nicholas Nethercote 3b0485fcdb Bug 1294645 - Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl. r=froydnj.
Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.

This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.

--HG--
extra : rebase_source : c15d85298e0975fd030cd8f8f8e54501f453959b
2016-08-12 17:36:22 +10:00
Nathan Froyd 96fd6a0aed Bug 1254779 - add tests to verify allocation function hooking; r=glandium 2016-08-12 18:55:07 -04:00
Nicholas Nethercote bab6d17ebf Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_IMETHODIMP F() override;      --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final;         --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
2016-08-08 10:54:47 +10:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Carsten "Tomcat" Book bd81ddd0b0 merge mozilla-inbound to mozilla-central a=merge 2016-08-02 17:09:31 +02:00
JW Wang 48675814bd Bug 1290338. Part 1 - add a gtest to test WatchManager::Shutdown(). r=bholley
MozReview-Commit-ID: CJ3JJU2zLUF

--HG--
extra : rebase_source : 2495a541366c5baedec3eddf135e2507589824c6
2016-07-29 11:26:41 +08:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Thomas Zimmermann 4bee1b2945 Bug 1288077: Forward declare arrays by including 'nsTArrayForwardDeclare.h', r=froydnj
MozReview-Commit-ID: 4RBeHDyhQgr
2016-07-20 17:29:36 +02:00
Honza Bambas c88a1286d2 Bug 1244306 - Rotate mozlog files within a size limit. r=erahm 2016-07-29 06:51:00 -04:00
Nathan Froyd 5dba0130cc Bug 1271751 - part 8 - fix bug in nsTArray_CopyWithConstructors; r=erahm
The backwards copying case in MoveOverlappingRegion had a bug: rather
than destroying each element from the source range as we moved it, we
would always destroy the element at the beginning of the source range.
Fortunately, none of the existing types that were copied via
constructors seem to trigger the problematic code.
2016-07-08 16:59:04 -04:00
Nathan Froyd 09a852e8b4 Bug 1271751 - part 0 - remove heap functions from nsTArray; r=erahm
They are unused, except for tests.
2016-07-08 16:59:05 -04:00
Eric Rahm 878eac623e Bug 1249352 - Part 4: Add a fallible NS_EscapeURL. r=froydnj 2016-06-27 11:10:46 -07:00
Jan Varga 2d1e6d62c8 Bug 1246828 - Part 4: Rename profile-before-change2 to profile-before-change-qm and profile-before-change3 to profile-before-change-telemetry; r=asuth 2016-06-15 11:49:04 +01:00
Jan Varga b85865d615 Bug 1246828 - Part 1: Add an additional notification profile-before-change3 and update telemetry sending code to use it; r=asuth 2016-06-15 11:48:39 +01:00
Gerald Squelart e4f93ee534 Bug 1271593 - Unit test for NS_NewRunnableFunction - r=froydnj
Tests to verify that the number of copies and moves are as expected.
Also check that the runnable is fully self-contained and can be used after the
initial function objects have been destroyed or moved-from.

MozReview-Commit-ID: ArwIG9BEhDX

--HG--
extra : rebase_source : b2ee07294fcff17b76da468ddbaeb2b62d600536
2016-06-02 00:53:35 +02:00
Andrew McCreight 35eaf64b42 Bug 1273190, part 3 - Fix some modelines in xpcom/. r=froydnj
Autogenerated by modeline.py.
2016-05-24 14:45:44 -07:00
Andrew McCreight 1ab7f7f2be Bug 1273190, part 2 - Add some missing licenses and mode lines to XPCOM gtests. r=froydnj 2016-05-24 14:45:44 -07:00
Andrew McCreight 21bb33df87 Bug 1273190, part 1 - Fix indentation and mode lines for various xpcom/ files. r=froydnj 2016-05-24 14:45:44 -07:00
Honza Bambas bd3a9d8a05 Bug 1274583 - Add SkipUntil method to mozilla::Tokenizer, r=froydnj
MozReview-Commit-ID: HndyF0L0pdx

--HG--
extra : rebase_source : ffac585c1ed47eebe6e5e9f0ae8c4d566c7cd317
2016-05-22 07:33:00 -07:00
Ben Kelly 77ab8893ab Bug 1093357 P4 Follow-on to nsPipe3.cpp to address review feedback missing in P0 patch. r=me 2016-05-16 03:31:48 -07:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Kyle Huey 7c2af31504 Bug 1268313: Part 5 - Make NS_NewRunnableMethod able to call const functions. r=froydnj 2016-05-05 01:44:59 -07:00
Kyle Huey 9570aa23b3 Bug 1268723: Make it clear that the TestCrashyOperation crashes are expected. r=njn
--HG--
extra : rebase_source : e2e8e6272aa8e80cd4b3db6828009555d4f5311e
2016-05-03 22:39:53 -07:00
Nicholas Nethercote 8d71390a3e Bug 1269648 - Add missing crash-reporter null checks. r=froydnj.
In two places we fail to check if we successful obtained the crash reporter
before we use it.

--HG--
extra : rebase_source : f757b8320788220b5a4d5242a0264d577d92f15e
2016-05-03 17:08:04 +10:00
Aryeh Gregor f14f1babe8 Bug 1193762 part 8 - Fix things that will break; r=froydnj
It looks like VC++ doesn't like comparisons of nsCOMPtr to 0 after this
change, but those are bad style anyway, so I removed them from
TestCOMPtr.cpp instead of trying to make them work.
2016-05-01 21:29:23 +03:00
Carsten "Tomcat" Book 894326b653 Backed out changeset 726f7361e0b8 (bug 1268313)
--HG--
extra : rebase_source : 3e04a6751a1cce2be7692763b4520dcca053f210
2016-04-29 14:21:20 +02:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Kyle Huey 732a15e600 Bug 1268313: Part 5 - Make NS_NewRunnableMethod able to call const functions. r=froydnj 2016-04-28 14:08:24 -07:00
Mike Shal 8689f72e8b Bug 1266875 - Remove custom install rules; r=chmanchester
MozReview-Commit-ID: CoWdHidlDrV
2016-04-18 10:36:07 -04:00
Nicholas Nethercote 2f1707f8ea Bug 1267227 - Don't run the PLDHashTableTest.GrowToMaxCapacity gtest on 32-bit machines, because it sometimes OOMs. r=erahm.
--HG--
extra : rebase_source : 79ecc129edfca2a63a52f8dea4b12c8ae1b94fcc
2016-04-27 16:30:14 +10:00
Sebastian Hengst b4020b78c0 Backed out changeset e786ecce31b2 (bug 1266875) for pgo build bustage in xpcshell/xpcom/tests/unit/nsIFileEnumerator. r=backout on a CLOSED TREE 2016-04-27 18:35:41 +02:00
Mike Shal a204083dd1 Bug 1266875 - Remove custom install rules; r=chmanchester
MozReview-Commit-ID: CoWdHidlDrV
2016-04-18 10:36:07 -04:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Valentin Gosu a44929e1eb Bug 1261382 - Add ReadUntil method to Tokenizer r=mayhemer 2016-04-08 16:27:32 +02:00
Nicholas Nethercote e4dec8d42f Bug 1261735 (part 1) - Overhaul the atom implementation. r=froydnj,erahm.
This patch changes things so that dynamic atoms and static atoms have distinct
implementations. This is a step towards allowing dynamic atoms and static atoms
to have different layouts in memory, which will allow static atoms to be
represented more compactly.

Specifically, the patch does the following.

- It renames AtomImpl as DynamicAtom and PermanentAtomImpl as StaticAtom, and
  the latter is no longer a subclass of the former. This required duplicating
  some methods from the former into the latter: ScriptableToString(),
  ToUTF8String(), ScriptableEquals(), IsStaticAtom(). (This duplication will
  disappear in the future if the representations of dynamic atoms and static
  atoms diverge. Indeed, SizeOfIncludingThis() is already different in the two
  classes.)

- It replaces all mentions of "permanent"/"non-permanent" atoms with
  "static"/"dynamic".

- In ~DynamicAtom() it removes the check that causes gAtomTable to be deleted
  when it becomes empty. This will only happen at shutdown and so doesn't seem
  useful.

- It documents better various things, especially the basics of the
  dynamic/static split, the transmutation of dynamic atoms to static atoms, and
  the details of the SizeOf functions.

--HG--
extra : rebase_source : dbf903012e70ebf1a43de1e1088db1bc1b8dd4f4
2016-04-01 11:18:06 +11:00
Nicholas Nethercote d376f9f82e Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm.
do_GetAtom() is currently just a synonym for NS_NewAtom().

--HG--
extra : rebase_source : f4409784f931616cbc300591e6b843d30805c273
2016-03-29 10:09:43 +11:00
Kyle Huey d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Ted Mielczarek 815dd278b6 bug 1259753 - fix some C++ unittests to use ScopedXPCOM to init XPCOM. r=ms2ger
MozReview-Commit-ID: B6xdlB9Di0y

--HG--
extra : rebase_source : 182d29d677c77ae6780260f5fc9b0792bdd98f84
extra : amend_source : 1e4fa2453d6773bd1e63f52b7aa3bf61e61600ff
2016-03-25 10:04:37 -04:00
Nicholas Nethercote bbfe3dbc14 Bug 1257402 - Remove NS_NewPermanentAtom() and nsIAtomService.getPermanentAtom(). r=froydnj,kmag.
The former is only used inconsequentially in tests. The second is not used at
all.

--HG--
extra : rebase_source : 4cfe11f933f1fe8f788e823c5107941085cef92c
2016-03-17 13:11:31 +11:00
Nicholas Nethercote 41e924c6e0 Bug 1257128 (part 1) - Remove nsIAtom.equalsUTF8. r=froydnj.
It's only used in tests.
2016-03-16 21:05:30 +11:00
Gregory Szorc b19cc22cce Bug 1257410 - Use %p and cast in printf to avoid C4477 on VS2015; r=khuey
MozReview-Commit-ID: 21XrhzPiJFQ

--HG--
extra : rebase_source : a9375998fcf663bf2b285cc2105778836eedffa8
2016-03-21 14:19:18 -07:00
Nicholas Nethercote a2f068b2ad Bug 1253085 - Remove the |PLDHashTable*| argument from PLDHash{HashKey,MatchEntry}. r=froydnj.
This is easy because it's never needed.

--HG--
extra : rebase_source : 78830dab41c40a1544fa55fc69ca9c1c6709d767
2016-03-16 15:33:44 +11:00
Nathan Froyd 7bb9ec5177 Bug 1229985 - remove nsAutoArrayPtr; r=erahm 2015-12-06 10:51:43 -05:00
Mike Shal de1e7b8d59 Bug 1241976 - port INSTALL_TARGETS in xpcom/tests to moz.build; r=glandium 2016-01-21 21:06:50 -05:00
ISHIKAWA, Chiaki be2b50a7f8 Bug 1248252 - Improper outdated octal constant syntax in M-C tree. Use '0o' prefix. r=dao
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check

 - the outdated 0666 octal constant is still parsed correctly,
 - the outdated 0666 octal constant raises syntax error flag
   in strict mode, etc.

So leave them alone.
2016-02-15 08:57:00 +01:00
Valentin Gosu 52d81f715f Bug 241788 - mozilla::Tokenizer - token type for \n should whitespace if given in constructor r=honzab 2016-02-05 14:43:45 +01:00