Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Revert of Fix test CastStreamingApiTestWithPixelOutput.EndToEnd. (htt…
Browse files Browse the repository at this point in the history
…ps://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
> [email protected]
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279210

[email protected],[email protected]
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
  • Loading branch information
[email protected] committed Jun 23, 2014
1 parent 30e29db commit ede2c7e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,13 @@
#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"
#include "net/base/rand_callback.h"
#include "net/udp/udp_socket.h"
#include "testing/gtest/include/gtest/gtest.h"

using media::cast::test::GetFreeLocalPort;

namespace extensions {

class CastStreamingApiTest : public ExtensionApiTest {
Expand All @@ -41,7 +38,6 @@ class CastStreamingApiTest : public ExtensionApiTest {
command_line->AppendSwitchASCII(
extensions::switches::kWhitelistedExtensionID,
"ddchlicdkolnonkihahngkmmmjnjlkkf");
command_line->AppendSwitchASCII(::switches::kWindowSize, "400,400");
}
};

Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ede2c7e

Please sign in to comment.