summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-23 23:48:38 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-23 23:48:38 +0000
commitede2c7e3862c2f16ebb5b04f3a2a3d50f9e56069 (patch)
tree8181587f9f200eb2c9aab99818d3177b07e81e82
parent30e29db70347455727aac58218319921bb644749 (diff)
downloadchromium_src-ede2c7e3862c2f16ebb5b04f3a2a3d50f9e56069.zip
chromium_src-ede2c7e3862c2f16ebb5b04f3a2a3d50f9e56069.tar.gz
chromium_src-ede2c7e3862c2f16ebb5b04f3a2a3d50f9e56069.tar.bz2
Revert of Fix test CastStreamingApiTestWithPixelOutput.EndToEnd. (https://codereview.chromium.org/339433003/)
Reason for revert: Broke linux lsan: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%282%29/builds/4075/steps/browser_tests/logs/EndToEnd Direct leak of 336 byte(s) in 1 object(s) allocated from: #0 0x514ffb in operator new(unsigned long) /usr/local/google/work/chromium/src/third_party/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:55 #1 0xbdd835 in extensions::CastStreamingApiTestWithPixelOutput_EndToEnd_Test::RunTestOnMainThread() chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc:314 <truncated, full output is in gzipped JSON output at end of step> #23 0x3e70dd1 in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2045 #24 0x3e70dd1 in testing::Test::Run() testing/gtest/src/gtest.cc:2057 #25 0x3e73169 in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2237 #26 0x3e73ef6 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2344 #27 0x3e8700a in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4065 #28 0x3e86640 in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2045 #29 0x3e86640 in testing::UnitTest::Run() testing/gtest/src/gtest.cc:3697 #30 0x35a505c in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2231 #31 0x35a505c in base::TestSuite::Run() base/test/test_suite.cc:227 #32 0x2118154 in ChromeBrowserTestSuiteRunner::RunTestSuite(int, char**) chrome/test/base/browser_tests_main.cc:14 #33 0xce70779 in content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:468 #34 0x33ff4bb in LaunchChromeTests(int, ChromeTestSuiteRunner*, int, char**) chrome/test/base/chrome_test_launcher.cc:129 #35 0x2118048 in main chrome/test/base/browser_tests_main.cc:21 #36 0x7f2add6cd76c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 Original issue's description: > Fix test CastStreamingApiTestWithPixelOutput.EndToEnd. > Update end_to_end_sender.js to use standard WebAudio API. > Modify unit test to use a larger window size (previous window size was > too small, which negatively impacted the median color computation > routine.) > > BUG=349599 > R=miu@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279210 TBR=miu@chromium.org,kmarshall@chromium.org NOTREECHECKS=true NOTRY=true BUG=349599 Review URL: https://codereview.chromium.org/351683003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279231 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc20
-rw-r--r--chrome/test/data/extensions/api_test/cast_streaming/end_to_end_sender.js15
2 files changed, 21 insertions, 14 deletions
diff --git a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
index c66a0a1..a10f300 100644
--- a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
+++ b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc
@@ -22,7 +22,6 @@
#include "media/cast/test/utility/audio_utility.h"
#include "media/cast/test/utility/default_config.h"
#include "media/cast/test/utility/in_process_receiver.h"
-#include "media/cast/test/utility/net_utility.h"
#include "media/cast/test/utility/standalone_cast_environment.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
@@ -30,8 +29,6 @@
#include "net/udp/udp_socket.h"
#include "testing/gtest/include/gtest/gtest.h"
-using media::cast::test::GetFreeLocalPort;
-
namespace extensions {
class CastStreamingApiTest : public ExtensionApiTest {
@@ -41,7 +38,6 @@ class CastStreamingApiTest : public ExtensionApiTest {
command_line->AppendSwitchASCII(
extensions::switches::kWhitelistedExtensionID,
"ddchlicdkolnonkihahngkmmmjnjlkkf");
- command_line->AppendSwitchASCII(::switches::kWindowSize, "400,400");
}
};
@@ -295,14 +291,26 @@ class CastStreamingApiTestWithPixelOutput : public CastStreamingApiTest {
// use the API to send it out. At the same time, this test launches an
// in-process Cast receiver, listening on a localhost UDP socket, to receive the
// content and check whether it matches expectations.
-IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, EndToEnd) {
+//
+// Note: This test is disabled until outstanding bugs are fixed and the
+// media/cast library has achieved sufficient stability.
+// http://crbug.com/349599
+IN_PROC_BROWSER_TEST_F(CastStreamingApiTestWithPixelOutput, DISABLED_EndToEnd) {
+ // Determine a unused UDP port for the in-process receiver to listen on.
+ // Method: Bind a UDP socket on port 0, and then check which port the
+ // operating system assigned to it.
+ net::IPAddressNumber localhost;
+ localhost.push_back(127);
+ localhost.push_back(0);
+ localhost.push_back(0);
+ localhost.push_back(1);
scoped_ptr<net::UDPSocket> receive_socket(
new net::UDPSocket(net::DatagramSocket::DEFAULT_BIND,
net::RandIntCallback(),
NULL,
net::NetLog::Source()));
receive_socket->AllowAddressReuse();
- ASSERT_EQ(net::OK, receive_socket->Bind(GetFreeLocalPort()));
+ ASSERT_EQ(net::OK, receive_socket->Bind(net::IPEndPoint(localhost, 0)));
net::IPEndPoint receiver_end_point;
ASSERT_EQ(net::OK, receive_socket->GetLocalAddress(&receiver_end_point));
receive_socket.reset();
diff --git a/chrome/test/data/extensions/api_test/cast_streaming/end_to_end_sender.js b/chrome/test/data/extensions/api_test/cast_streaming/end_to_end_sender.js
index f67b3ea..aac11da 100644
--- a/chrome/test/data/extensions/api_test/cast_streaming/end_to_end_sender.js
+++ b/chrome/test/data/extensions/api_test/cast_streaming/end_to_end_sender.js
@@ -37,22 +37,21 @@ function updateTestPattern() {
}
if (!this.audioContext) {
- this.audioContext = new AudioContext();
- this.gainNode = this.audioContext.createGain();
+ this.audioContext = new webkitAudioContext();
+ this.gainNode = this.audioContext.createGainNode();
this.gainNode.gain.value = 0.5;
this.gainNode.connect(this.audioContext.destination);
} else {
- this.oscillator.stop();
this.oscillator.disconnect();
}
// Note: We recreate the oscillator each time because this switches the audio
// frequency immediately. Re-using the same oscillator tends to take several
// hundred milliseconds to ramp-up/down the frequency.
this.oscillator = audioContext.createOscillator();
- this.oscillator.type = OscillatorNode.SINE;
+ this.oscillator.type = "sine";
this.oscillator.frequency.value = freqs[curTestIdx];
- this.oscillator.connect(this.gainNode);
- this.oscillator.start();
+ this.oscillator.connect(gainNode);
+ this.oscillator.noteOn(0);
}
// Calls updateTestPattern(), then waits and calls itself again to advance to
@@ -96,8 +95,8 @@ chrome.test.runTests([
return;
}
- var width = 400;
- var height = 400;
+ var width = 128;
+ var height = 128;
var frameRate = 15;
chrome.tabCapture.capture(