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

Side by Side Diff: chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
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>
(...skipping 13 matching lines...) Expand all
24 #include "media/base/video_frame.h" 24 #include "media/base/video_frame.h"
25 #include "media/cast/cast_config.h" 25 #include "media/cast/cast_config.h"
26 #include "media/cast/cast_environment.h" 26 #include "media/cast/cast_environment.h"
27 #include "media/cast/test/utility/audio_utility.h" 27 #include "media/cast/test/utility/audio_utility.h"
28 #include "media/cast/test/utility/default_config.h" 28 #include "media/cast/test/utility/default_config.h"
29 #include "media/cast/test/utility/in_process_receiver.h" 29 #include "media/cast/test/utility/in_process_receiver.h"
30 #include "media/cast/test/utility/net_utility.h" 30 #include "media/cast/test/utility/net_utility.h"
31 #include "media/cast/test/utility/standalone_cast_environment.h" 31 #include "media/cast/test/utility/standalone_cast_environment.h"
32 #include "net/base/net_errors.h" 32 #include "net/base/net_errors.h"
33 #include "net/base/rand_callback.h" 33 #include "net/base/rand_callback.h"
34 #include "net/log/net_log_source.h"
34 #include "net/udp/udp_server_socket.h" 35 #include "net/udp/udp_server_socket.h"
35 #include "testing/gtest/include/gtest/gtest.h" 36 #include "testing/gtest/include/gtest/gtest.h"
36 37
37 using media::cast::test::GetFreeLocalPort; 38 using media::cast::test::GetFreeLocalPort;
38 39
39 namespace extensions { 40 namespace extensions {
40 41
41 class CastStreamingApiTest : public ExtensionApiTest { 42 class CastStreamingApiTest : public ExtensionApiTest {
42 public: 43 public:
43 void SetUpCommandLine(base::CommandLine* command_line) override { 44 void SetUpCommandLine(base::CommandLine* command_line) override {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // 339 //
339 // TODO(miu): Now that this test has been long-stable on Release build bots, it 340 // TODO(miu): Now that this test has been long-stable on Release build bots, it
340 // should be enabled for the Debug build bots. http://crbug.com/396413 341 // should be enabled for the Debug build bots. http://crbug.com/396413
341 #if defined(NDEBUG) 342 #if defined(NDEBUG)
342 #define MAYBE_EndToEnd EndToEnd 343 #define MAYBE_EndToEnd EndToEnd
343 #else 344 #else
344 #define MAYBE_EndToEnd DISABLED_EndToEnd 345 #define MAYBE_EndToEnd DISABLED_EndToEnd
345 #endif 346 #endif
346 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, MAYBE_EndToEnd) { 347 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, MAYBE_EndToEnd) {
347 std::unique_ptr<net::UDPServerSocket> receive_socket( 348 std::unique_ptr<net::UDPServerSocket> receive_socket(
348 new net::UDPServerSocket(NULL, net::NetLog::Source())); 349 new net::UDPServerSocket(NULL, net::NetLogSource()));
349 receive_socket->AllowAddressReuse(); 350 receive_socket->AllowAddressReuse();
350 ASSERT_EQ(net::OK, receive_socket->Listen(GetFreeLocalPort())); 351 ASSERT_EQ(net::OK, receive_socket->Listen(GetFreeLocalPort()));
351 net::IPEndPoint receiver_end_point; 352 net::IPEndPoint receiver_end_point;
352 ASSERT_EQ(net::OK, receive_socket->GetLocalAddress(&receiver_end_point)); 353 ASSERT_EQ(net::OK, receive_socket->GetLocalAddress(&receiver_end_point));
353 receive_socket.reset(); 354 receive_socket.reset();
354 355
355 // Start the in-process receiver that examines audio/video for the expected 356 // Start the in-process receiver that examines audio/video for the expected
356 // test patterns. 357 // test patterns.
357 const scoped_refptr<media::cast::StandaloneCastEnvironment> cast_environment( 358 const scoped_refptr<media::cast::StandaloneCastEnvironment> cast_environment(
358 new media::cast::StandaloneCastEnvironment()); 359 new media::cast::StandaloneCastEnvironment());
(...skipping 29 matching lines...) Expand all
388 389
389 delete receiver; 390 delete receiver;
390 cast_environment->Shutdown(); 391 cast_environment->Shutdown();
391 } 392 }
392 393
393 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) { 394 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) {
394 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html")); 395 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html"));
395 } 396 }
396 397
397 } // namespace extensions 398 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698