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

Unified Diff: webrtc/modules/desktop_capture/window_capturer_unittest.cc

Issue 2479553006: Remove GetWindowList / GetScreenList and SelectWindow / SelectScreen from WebRTC (Closed)
Patch Set: Resolve review comments 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/window_capturer_unittest.cc
diff --git a/webrtc/modules/desktop_capture/window_capturer_unittest.cc b/webrtc/modules/desktop_capture/window_capturer_unittest.cc
index a30d23e0427b9db18d5254629177099ab655e258..e56a1de29fc1968e545528dbe75f080cc7c6ff2f 100644
--- a/webrtc/modules/desktop_capture/window_capturer_unittest.cc
+++ b/webrtc/modules/desktop_capture/window_capturer_unittest.cc
@@ -43,12 +43,11 @@ class WindowCapturerTest : public testing::Test,
// Verify that we can enumerate windows.
TEST_F(WindowCapturerTest, Enumerate) {
- WindowCapturer::WindowList windows;
- EXPECT_TRUE(capturer_->GetWindowList(&windows));
+ DesktopCapturer::SourceList sources;
+ EXPECT_TRUE(capturer_->GetSourceList(&sources));
// Verify that window titles are set.
- for (WindowCapturer::WindowList::iterator it = windows.begin();
- it != windows.end(); ++it) {
+ for (auto it = sources.begin(); it != sources.end(); ++it) {
EXPECT_FALSE(it->title.empty());
}
}
@@ -61,24 +60,23 @@ TEST_F(WindowCapturerTest, Enumerate) {
// have a python script showing Tk dialog, but launching code will differ
// between platforms).
TEST_F(WindowCapturerTest, Capture) {
- WindowCapturer::WindowList windows;
+ DesktopCapturer::SourceList sources;
capturer_->Start(this);
- EXPECT_TRUE(capturer_->GetWindowList(&windows));
+ EXPECT_TRUE(capturer_->GetSourceList(&sources));
// Verify that we can select and capture each window.
- for (WindowCapturer::WindowList::iterator it = windows.begin();
- it != windows.end(); ++it) {
+ for (auto it = sources.begin(); it != sources.end(); ++it) {
frame_.reset();
- if (capturer_->SelectWindow(it->id)) {
+ if (capturer_->SelectSource(it->id)) {
capturer_->CaptureFrame();
}
// If we failed to capture a window make sure it no longer exists.
if (!frame_.get()) {
- WindowCapturer::WindowList new_list;
- EXPECT_TRUE(capturer_->GetWindowList(&new_list));
- for (WindowCapturer::WindowList::iterator new_list_it = new_list.begin();
- new_list_it != new_list.end(); ++new_list_it) {
+ DesktopCapturer::SourceList new_list;
+ EXPECT_TRUE(capturer_->GetSourceList(&new_list));
+ for (auto new_list_it = new_list.begin(); new_list_it != new_list.end();
+ ++new_list_it) {
EXPECT_FALSE(it->id == new_list_it->id);
}
continue;
« no previous file with comments | « webrtc/modules/desktop_capture/window_capturer_null.cc ('k') | webrtc/modules/desktop_capture/window_capturer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698