Two changes:
1) Libjingle and webrtc use different jsoncpp, so we need to distinguish them.
2) Update the webrtcsession_unittest:
 * Use the Thread::SleepMs
 * Remove main, which has been defined in talk/base/unittest_main.
Review URL: http://webrtc-codereview.appspot.com/107003

git-svn-id: http://webrtc.googlecode.com/svn/trunk@356 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/third_party_mods/libjingle/source/talk/app/webrtc/webrtc.scons b/third_party_mods/libjingle/source/talk/app/webrtc/webrtc.scons
index f4953f8..99cccc9 100644
--- a/third_party_mods/libjingle/source/talk/app/webrtc/webrtc.scons
+++ b/third_party_mods/libjingle/source/talk/app/webrtc/webrtc.scons
@@ -20,7 +20,6 @@
   name = 'webrtc',

   srcs = [

     'webrtcsession_unittest.cc',

-    'testing/timing.cc'

   ],

   libs = [

     'srtp',

diff --git a/third_party_mods/libjingle/source/talk/app/webrtc/webrtc_json.h b/third_party_mods/libjingle/source/talk/app/webrtc/webrtc_json.h
index 8165270..a9bb95c 100644
--- a/third_party_mods/libjingle/source/talk/app/webrtc/webrtc_json.h
+++ b/third_party_mods/libjingle/source/talk/app/webrtc/webrtc_json.h
@@ -30,7 +30,11 @@
 
 #include <string>
 
+#ifdef WEBRTC_RELATIVE_PATH
 #include "json/json.h"
+#else
+#include "third_party/jsoncpp/json.h"
+#endif
 #include "talk/session/phone/codec.h"
 #include "talk/p2p/base/candidate.h"
 
diff --git a/third_party_mods/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc b/third_party_mods/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc
index 6a9eeaa..ce0e031 100644
--- a/third_party_mods/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc
+++ b/third_party_mods/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc
@@ -29,7 +29,6 @@
 
 #include "base/gunit.h"
 #include "base/helpers.h"
-#include "talk/app/webrtc/testing/timing.h"
 #include "talk/app/webrtc/webrtcsession.h"
 #include "talk/base/fakenetwork.h"
 #include "talk/base/scoped_ptr.h"
@@ -377,7 +376,6 @@
 
   bool WaitForCallback(CallbackId id, int timeout_ms) {
     bool success = false;
-    Timing my_timer;
     for (int ms = 0; ms < timeout_ms; ms++) {
       const CallbackId peek_id = PeekOldestCallback();
       if (peek_id == id) {
@@ -388,7 +386,7 @@
         success = false;
         break;
       }
-      my_timer.IdleWait(0.001);
+      talk_base::Thread::SleepMs(1);
     }
     return success;
   }
@@ -827,16 +825,14 @@
 };
 
 bool CallbackReceived(WebRTCSessionTest* session, int timeout) {
-  Timing my_timer;
-  my_timer.IdleWait(timeout * 0.001);
+  talk_base::Thread::SleepMs(timeout);
   const OnSignalImpl::CallbackId peek_id =
       session->PeekOldestCallback();
   return peek_id != OnSignalImpl::kNone;
 }
 
 void SleepMs(int timeout_ms) {
-  Timing my_timer;
-  my_timer.IdleWait(timeout_ms * 0.001);
+  talk_base::Thread::SleepMs(timeout_ms);
 }
 
 TEST(WebRtcSessionTest, InitializationReceiveSanity) {
@@ -874,12 +870,3 @@
   // All callbacks should be caught by my session. Assert it.
   ASSERT_FALSE(CallbackReceived(my_session.get(), 1000));
 }
-
-int main(int argc, char* argv[]) {
-  ::testing::InitGoogleTest(&argc, argv);
-  // Added return_value so that it's convenient to put a breakpoint before
-  // exiting please note that the return value from RUN_ALL_TESTS() must
-  // be returned by the main function.
-  const int return_value = RUN_ALL_TESTS();
-  return return_value;
-}