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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <cmath> | 9 #include <cmath> |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
| 19 #include "base/threading/thread_restrictions.h" |
19 #include "chrome/browser/extensions/extension_apitest.h" | 20 #include "chrome/browser/extensions/extension_apitest.h" |
20 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
21 #include "content/public/common/content_switches.h" | 22 #include "content/public/common/content_switches.h" |
22 #include "extensions/common/switches.h" | 23 #include "extensions/common/switches.h" |
23 #include "media/base/bind_to_current_loop.h" | 24 #include "media/base/bind_to_current_loop.h" |
24 #include "media/base/video_frame.h" | 25 #include "media/base/video_frame.h" |
25 #include "media/cast/cast_config.h" | 26 #include "media/cast/cast_config.h" |
26 #include "media/cast/cast_environment.h" | 27 #include "media/cast/cast_environment.h" |
27 #include "media/cast/test/utility/audio_utility.h" | 28 #include "media/cast/test/utility/audio_utility.h" |
28 #include "media/cast/test/utility/default_config.h" | 29 #include "media/cast/test/utility/default_config.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 receiver->AddExpectedTone(500 /* Hz */); | 382 receiver->AddExpectedTone(500 /* Hz */); |
382 receiver->AddExpectedTone(1800 /* Hz */); | 383 receiver->AddExpectedTone(1800 /* Hz */); |
383 receiver->AddExpectedColor(YUVColor(82, 90, 240)); // rgb(255, 0, 0) | 384 receiver->AddExpectedColor(YUVColor(82, 90, 240)); // rgb(255, 0, 0) |
384 receiver->AddExpectedColor(YUVColor(145, 54, 34)); // rgb(0, 255, 0) | 385 receiver->AddExpectedColor(YUVColor(145, 54, 34)); // rgb(0, 255, 0) |
385 receiver->AddExpectedColor(YUVColor(41, 240, 110)); // rgb(0, 0, 255) | 386 receiver->AddExpectedColor(YUVColor(41, 240, 110)); // rgb(0, 0, 255) |
386 receiver->Start(); | 387 receiver->Start(); |
387 receiver->WaitForExpectedTonesAndColors(); | 388 receiver->WaitForExpectedTonesAndColors(); |
388 receiver->Stop(); | 389 receiver->Stop(); |
389 | 390 |
390 delete receiver; | 391 delete receiver; |
| 392 base::ThreadRestrictions::ScopedAllowIO allow_io; |
391 cast_environment->Shutdown(); | 393 cast_environment->Shutdown(); |
392 } | 394 } |
393 | 395 |
394 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) { | 396 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) { |
395 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html")); | 397 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html")); |
396 } | 398 } |
397 | 399 |
398 } // namespace extensions | 400 } // namespace extensions |
OLD | NEW |