| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <cmath> | 6 #include <cmath> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/float_util.h" | 9 #include "base/float_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 EnablePixelOutput(); | 288 EnablePixelOutput(); |
| 289 CastStreamingApiTest::SetUp(); | 289 CastStreamingApiTest::SetUp(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 292 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 293 command_line->AppendSwitchASCII(::switches::kWindowSize, "128,128"); | 293 command_line->AppendSwitchASCII(::switches::kWindowSize, "128,128"); |
| 294 CastStreamingApiTest::SetUpCommandLine(command_line); | 294 CastStreamingApiTest::SetUpCommandLine(command_line); |
| 295 } | 295 } |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 // http://crbug.com/177163 | 298 // http://crbug.com/396413 |
| 299 #if defined(OS_WIN) && !defined(NDEBUG) | |
| 300 #define MAYBE_EndToEnd DISABLED_TabsApi | |
| 301 #else | |
| 302 #define MAYBE_EndToEnd EndToEnd | |
| 303 #endif // defined(OS_WIN) && !defined(NDEBUG) | |
| 304 // Tests the Cast streaming API and its basic functionality end-to-end. An | 299 // Tests the Cast streaming API and its basic functionality end-to-end. An |
| 305 // extension subtest is run to generate test content, capture that content, and | 300 // extension subtest is run to generate test content, capture that content, and |
| 306 // use the API to send it out. At the same time, this test launches an | 301 // use the API to send it out. At the same time, this test launches an |
| 307 // in-process Cast receiver, listening on a localhost UDP socket, to receive the | 302 // in-process Cast receiver, listening on a localhost UDP socket, to receive the |
| 308 // content and check whether it matches expectations. | 303 // content and check whether it matches expectations. |
| 309 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, MAYBE_EndToEnd) { | 304 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, DISABLED_EndToEnd) { |
| 310 scoped_ptr<net::UDPSocket> receive_socket( | 305 scoped_ptr<net::UDPSocket> receive_socket( |
| 311 new net::UDPSocket(net::DatagramSocket::DEFAULT_BIND, | 306 new net::UDPSocket(net::DatagramSocket::DEFAULT_BIND, |
| 312 net::RandIntCallback(), | 307 net::RandIntCallback(), |
| 313 NULL, | 308 NULL, |
| 314 net::NetLog::Source())); | 309 net::NetLog::Source())); |
| 315 receive_socket->AllowAddressReuse(); | 310 receive_socket->AllowAddressReuse(); |
| 316 ASSERT_EQ(net::OK, receive_socket->Bind(GetFreeLocalPort())); | 311 ASSERT_EQ(net::OK, receive_socket->Bind(GetFreeLocalPort())); |
| 317 net::IPEndPoint receiver_end_point; | 312 net::IPEndPoint receiver_end_point; |
| 318 ASSERT_EQ(net::OK, receive_socket->GetLocalAddress(&receiver_end_point)); | 313 ASSERT_EQ(net::OK, receive_socket->GetLocalAddress(&receiver_end_point)); |
| 319 receive_socket.reset(); | 314 receive_socket.reset(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 347 | 342 |
| 348 delete receiver; | 343 delete receiver; |
| 349 cast_environment->Shutdown(); | 344 cast_environment->Shutdown(); |
| 350 } | 345 } |
| 351 | 346 |
| 352 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) { | 347 IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, RtpStreamError) { |
| 353 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html")); | 348 ASSERT_TRUE(RunExtensionSubtest("cast_streaming", "rtp_stream_error.html")); |
| 354 } | 349 } |
| 355 | 350 |
| 356 } // namespace extensions | 351 } // namespace extensions |
| OLD | NEW |