blob: 482ac89aadec349570a5889ce37c7802ec3b7884 [file] [log] [blame]
henrike@webrtc.orgf0488722014-05-13 18:00:26 +00001/*
2 * Copyright 2010 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "webrtc/base/gunit.h"
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +000012#include "webrtc/base/x11windowpicker.h"
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000013#include "webrtc/base/logging.h"
14#include "webrtc/base/testutils.h"
15#include "webrtc/base/windowpicker.h"
16
17#if !defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
18#error Only for Linux
19#endif
20
21namespace rtc {
22
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +000023TEST(X11WindowPickerTest, TestGetWindowList) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000024 MAYBE_SKIP_SCREENCAST_TEST();
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +000025 X11WindowPicker window_picker;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000026 WindowDescriptionList descriptions;
27 window_picker.Init();
28 window_picker.GetWindowList(&descriptions);
29}
30
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +000031TEST(X11WindowPickerTest, TestGetDesktopList) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000032 MAYBE_SKIP_SCREENCAST_TEST();
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +000033 X11WindowPicker window_picker;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000034 DesktopDescriptionList descriptions;
35 EXPECT_TRUE(window_picker.Init());
36 EXPECT_TRUE(window_picker.GetDesktopList(&descriptions));
37 EXPECT_TRUE(descriptions.size() > 0);
38}
39
40} // namespace rtc