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

Unified Diff: remoting/host/desktop_shape_tracker_unittest.cc

Issue 83183007: Add DesktopShapeTracker with implementation for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_shape_tracker_mac.cc ('k') | remoting/host/desktop_shape_tracker_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_shape_tracker_unittest.cc
diff --git a/remoting/host/desktop_shape_tracker_unittest.cc b/remoting/host/desktop_shape_tracker_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3ea9e98d17f4e113e94b76f714fae88082ea936f
--- /dev/null
+++ b/remoting/host/desktop_shape_tracker_unittest.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// DesktopShapeTracker tests assume that there is at least one top-level
+// window on-screen. Currently we assume the presence of the Explorer
+// task bar window.
+
+#include "remoting/host/desktop_shape_tracker.h"
+
+#include "base/memory/scoped_ptr.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
+
+namespace remoting {
+
+// Verify that the desktop shape tracker returns a non-empty region.
+TEST(DesktopShapeTrackerTest, Basic) {
+ scoped_ptr<DesktopShapeTracker> shape_tracker = DesktopShapeTracker::Create(
+ webrtc::DesktopCaptureOptions::CreateDefault());
+
+ // Shape tracker is not supported on all platforms yet.
+#if defined(OS_WIN)
+ shape_tracker->RefreshDesktopShape();
+ EXPECT_FALSE(shape_tracker->desktop_shape().is_empty());
+#else
+ EXPECT_FALSE(shape_tracker);
+#endif
+}
+
+} // namespace remoting
« no previous file with comments | « remoting/host/desktop_shape_tracker_mac.cc ('k') | remoting/host/desktop_shape_tracker_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698