OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/media/native_desktop_media_list.h" | 5 #include "chrome/browser/media/native_desktop_media_list.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 base::Lock frame_values_lock_; | 126 base::Lock frame_values_lock_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(FakeWindowCapturer); | 128 DISALLOW_COPY_AND_ASSIGN(FakeWindowCapturer); |
129 }; | 129 }; |
130 | 130 |
131 ACTION_P2(CheckListSize, model, expected_list_size) { | 131 ACTION_P2(CheckListSize, model, expected_list_size) { |
132 EXPECT_EQ(expected_list_size, model->GetSourceCount()); | 132 EXPECT_EQ(expected_list_size, model->GetSourceCount()); |
133 } | 133 } |
134 | 134 |
135 ACTION_P(QuitMessageLoop, message_loop) { | 135 ACTION_P(QuitMessageLoop, message_loop) { |
136 message_loop->task_runner()->PostTask(FROM_HERE, | 136 message_loop->task_runner()->PostTask( |
137 base::MessageLoop::QuitClosure()); | 137 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
138 } | 138 } |
139 | 139 |
140 class DesktopMediaListTest : public testing::Test { | 140 class DesktopMediaListTest : public testing::Test { |
141 public: | 141 public: |
142 DesktopMediaListTest() | 142 DesktopMediaListTest() |
143 : window_capturer_(NULL), | 143 : window_capturer_(NULL), |
144 ui_thread_(content::BrowserThread::UI, | 144 ui_thread_(content::BrowserThread::UI, |
145 &message_loop_) { | 145 &message_loop_) { |
146 } | 146 } |
147 | 147 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // Swap the two windows. | 345 // Swap the two windows. |
346 webrtc::WindowCapturer::Window temp = list[0]; | 346 webrtc::WindowCapturer::Window temp = list[0]; |
347 list[0] = list[1]; | 347 list[0] = list[1]; |
348 list[1] = temp; | 348 list[1] = temp; |
349 window_capturer_->SetWindowList(list); | 349 window_capturer_->SetWindowList(list); |
350 | 350 |
351 message_loop_.Run(); | 351 message_loop_.Run(); |
352 } | 352 } |
353 | 353 |
354 } // namespace | 354 } // namespace |
OLD | NEW |