Update libjingle to CL 53398036.

Review URL: https://webrtc-codereview.appspot.com/2323004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4872 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mallinath@webrtc.org
2013-09-27 23:04:10 +00:00
parent 34c50c1de1
commit a27be8e4a1
41 changed files with 496 additions and 436 deletions

View File

@@ -30,6 +30,13 @@
// Utilities for testing talk_base infrastructure in unittests
#ifdef LINUX
#include <X11/Xlib.h>
// X defines a few macros that stomp on types that gunit.h uses.
#undef None
#undef Bool
#endif
#include <map>
#include <vector>
#include "talk/base/asyncsocket.h"
@@ -565,6 +572,38 @@ inline AssertionResult CmpHelperFileEq(const char* expected_expression,
///////////////////////////////////////////////////////////////////////////////
// Helpers for determining if X/screencasting is available (on linux).
#define MAYBE_SKIP_SCREENCAST_TEST() \
if (!testing::IsScreencastingAvailable()) { \
LOG(LS_WARNING) << "Skipping test, since it doesn't have the requisite " \
<< "X environment for screen capture."; \
return; \
} \
#ifdef LINUX
struct XDisplay {
XDisplay() : display_(XOpenDisplay(NULL)) { }
~XDisplay() { if (display_) XCloseDisplay(display_); }
bool IsValid() const { return display_ != NULL; }
operator Display*() { return display_; }
private:
Display* display_;
};
#endif
// Returns true if screencasting is available. When false, anything that uses
// screencasting features may fail.
inline bool IsScreencastingAvailable() {
#ifdef LINUX
XDisplay display;
if (!display.IsValid()) {
LOG(LS_WARNING) << "No X Display available.";
return false;
}
#endif
return true;
}
} // namespace testing
#endif // TALK_BASE_TESTUTILS_H__