| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // DesktopShapeTracker tests assume that there is at least one top-level | |
| 6 // window on-screen. Currently we assume the presence of the Explorer | |
| 7 // task bar window. | |
| 8 | |
| 9 #include "remoting/host/desktop_shape_tracker.h" | |
| 10 | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "build/build_config.h" | |
| 13 #include "testing/gtest/include/gtest/gtest.h" | |
| 14 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | |
| 15 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | |
| 16 | |
| 17 namespace remoting { | |
| 18 | |
| 19 // Verify that the desktop shape tracker returns a non-empty region. | |
| 20 TEST(DesktopShapeTrackerTest, Basic) { | |
| 21 scoped_ptr<DesktopShapeTracker> shape_tracker = DesktopShapeTracker::Create( | |
| 22 webrtc::DesktopCaptureOptions::CreateDefault()); | |
| 23 | |
| 24 // Shape tracker is not supported on all platforms yet. | |
| 25 #if defined(OS_WIN) | |
| 26 shape_tracker->RefreshDesktopShape(); | |
| 27 EXPECT_FALSE(shape_tracker->desktop_shape().is_empty()); | |
| 28 #else | |
| 29 EXPECT_FALSE(shape_tracker); | |
| 30 #endif | |
| 31 } | |
| 32 | |
| 33 } // namespace remoting | |
| OLD | NEW |