Closed Bug 1313479 Opened 8 years ago Closed 8 years ago

Convert XPCOM test TestObserverService to a gtest

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

Details

Attachments

(4 files)

Convert xpcom/tests/TestObserverService.cpp to a gtest and move to xpcom/tests/gtest/.
Just a note: it looks like this test currently doesn't do anything because it doesn't have a ScopedXPCOM declaration.
MozReview-Commit-ID: 7PAMbXHB5Ws
Attachment #8806826 - Flags: review?(nfroyd)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
MozReview-Commit-ID: 4KVwMQJcAIS
Attachment #8806827 - Flags: review?(nfroyd)
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
Attachment #8806828 - Flags: review?(nfroyd)
This splits out enumertion testing, adds testing of weak references, and other
basic tests for add and remove functions.

MozReview-Commit-ID: CLEafPJhe3z
Attachment #8806829 - Flags: review?(nfroyd)
Attachment #8806826 - Flags: review?(nfroyd) → review+
Attachment #8806827 - Flags: review?(nfroyd) → review+
Comment on attachment 8806828 [details] [diff] [review]
Part 1: Convert TestObserverService to a gtest

Review of attachment 8806828 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/tests/gtest/TestObserverService.cpp
@@ -55,5 @@
> -  nsCString topic( aTopic );
> -  nsString data( someData );
> -  /*
> -     The annoying double-cast below is to work around an annoying bug in
> -     the compiler currently used on wensleydale.  This is a test.

o.O
Attachment #8806828 - Flags: review?(nfroyd) → review+
Attachment #8806829 - Flags: review?(nfroyd) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: