Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1317009 - Port jsep_session_unittest and jsep_track_unittest to x…
Browse files Browse the repository at this point in the history
…ul gtest; r=bwc

MozReview-Commit-ID: spuZSAnSDC
  • Loading branch information
dminor committed Nov 15, 2016
1 parent 6ff21a1 commit 3abd298
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

#define GTEST_HAS_RTTI 0
#include "gtest/gtest.h"
#include "gtest_utils.h"

#include "FakeMediaStreams.h"
#include "FakeMediaStreamsImpl.h"
#include "FakeLogging.h"

#include "signaling/src/sdp/SdpMediaSection.h"
#include "signaling/src/sdp/SipccSdpParser.h"
Expand All @@ -30,19 +25,17 @@
#include "signaling/src/jsep/JsepSessionImpl.h"
#include "signaling/src/jsep/JsepTrack.h"

#include "mtransport_test_utils.h"

#include "FakeIPC.h"
#include "FakeIPC.cpp"

#include "TestHarness.h"

namespace mozilla {
static std::string kAEqualsCandidate("a=candidate:");
const static size_t kNumCandidatesPerComponent = 3;

class JsepSessionTestBase : public ::testing::Test
{
public:
static void SetUpTestCase() {
NSS_NoDB_Init(nullptr);
NSS_SetDomesticPolicy();
}
};

class FakeUuidGenerator : public mozilla::JsepUuidGenerator
Expand Down Expand Up @@ -4220,16 +4213,3 @@ TEST_F(JsepSessionTest, TestNonDefaultProtocol)
}

} // namespace mozilla

int
main(int argc, char** argv)
{
// Prevents some log spew
ScopedXPCOM xpcom("jsep_session_unittest");

NSS_NoDB_Init(nullptr);
NSS_SetDomesticPolicy();

::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,11 @@

#define GTEST_HAS_RTTI 0
#include "gtest/gtest.h"
#include "gtest_utils.h"

// Magic linker includes :(
#include "FakeMediaStreams.h"
#include "FakeMediaStreamsImpl.h"
#include "FakeLogging.h"

#include "signaling/src/jsep/JsepTrack.h"
#include "signaling/src/sdp/SipccSdp.h"
#include "signaling/src/sdp/SdpHelper.h"

#include "mtransport_test_utils.h"

#include "FakeIPC.h"
#include "FakeIPC.cpp"

#include "TestHarness.h"

namespace mozilla {

class JsepTrackTest : public ::testing::Test
Expand Down Expand Up @@ -1256,14 +1243,3 @@ TEST_F(JsepTrackTest, NonDefaultOpusParameters)
}

} // namespace mozilla

int
main(int argc, char** argv)
{
// Prevents some log spew
ScopedXPCOM xpcom("jsep_track_unittest");

::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

2 changes: 2 additions & 0 deletions media/webrtc/signaling/gtest/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and
]

SOURCES += [
'jsep_session_unittest.cpp',
'jsep_track_unittest.cpp',
'sdp_unittests.cpp',
]

Expand Down
2 changes: 0 additions & 2 deletions media/webrtc/signaling/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# TODO: bug 1172551 - get these tests working on iOS
if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uikit':
GeckoCppUnitTests([
'jsep_session_unittest',
'jsep_track_unittest',
'mediaconduit_unittests',
'mediapipeline_unittest',
'signaling_unittests',
Expand Down
2 changes: 0 additions & 2 deletions python/mozbuild/mozbuild/frontend/emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@
('test_unlock_notify', 'storage/test'),
('test_IHistory', 'toolkit/components/places/tests/cpp'),
('testcrasher', 'toolkit/crashreporter/test'),
('jsep_session_unittest', 'media/webrtc/signaling/test'),
('jsep_track_unittest', 'media/webrtc/signaling/test'),
('mediaconduit_unittests', 'media/webrtc/signaling/test'),
('mediapipeline_unittest', 'media/webrtc/signaling/test'),
('sdp_file_parser', 'media/webrtc/signaling/fuzztest'),
Expand Down
3 changes: 0 additions & 3 deletions testing/cppunittest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ skip-if = os == 'b2g' || os == 'android' # Bug 919646
[rlogringbuffer_unittest]
[runnable_utils_unittest]
[sctp_unittest]
[jsep_track_unittest]
[jsep_session_unittest]
skip-if = os == 'android' # Bug 1147631
[signaling_unittests]
[signaling_unittests_standalone]
[simpletokenbucket_unittest]
Expand Down

0 comments on commit 3abd298

Please sign in to comment.