Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: webrtc/base/macwindowpicker_unittest.cc

Issue 2511103002: Delete WindowPicker class and subclasses. (Closed)
Patch Set: Drop win32windowpicker_unittest.cc from build. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/macwindowpicker.cc ('k') | webrtc/base/win32windowpicker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
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 #include "webrtc/base/gunit.h"
11 #include "webrtc/base/logging.h"
12 #include "webrtc/base/macutils.h"
13 #include "webrtc/base/macwindowpicker.h"
14 #include "webrtc/base/windowpicker.h"
15
16 #if !defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
17 #error Only for WEBRTC_MAC && !WEBRTC_IOS
18 #endif
19
20 namespace rtc {
21
22 bool IsLeopardOrLater() {
23 return GetOSVersionName() >= kMacOSLeopard;
24 }
25
26 // Test that this works on new versions and fails acceptably on old versions.
27 TEST(MacWindowPickerTest, TestGetWindowList) {
28 MacWindowPicker picker, picker2;
29 WindowDescriptionList descriptions;
30 if (IsLeopardOrLater()) {
31 EXPECT_TRUE(picker.Init());
32 EXPECT_TRUE(picker.GetWindowList(&descriptions));
33 EXPECT_TRUE(picker2.GetWindowList(&descriptions)); // Init is optional
34 } else {
35 EXPECT_FALSE(picker.Init());
36 EXPECT_FALSE(picker.GetWindowList(&descriptions));
37 EXPECT_FALSE(picker2.GetWindowList(&descriptions));
38 }
39 }
40
41 // TODO: Add verification of the actual parsing, ie, add
42 // functionality to inject a fake get_window_array function which
43 // provide a pre-constructed list of windows.
44
45 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/macwindowpicker.cc ('k') | webrtc/base/win32windowpicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698