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

Unified Diff: trunk/src/content/browser/media/webrtc_browsertest.cc

Issue 262173013: Revert 267897 "Revert 267858 "Working around IO thread chrashes ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/build/android/pylib/gtest/filter/content_browsertests_disabled ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/browser/media/webrtc_browsertest.cc
===================================================================
--- trunk/src/content/browser/media/webrtc_browsertest.cc (revision 268473)
+++ trunk/src/content/browser/media/webrtc_browsertest.cc (working copy)
@@ -5,6 +5,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/strings/stringprintf.h"
+#include "base/threading/platform_thread.h"
#include "base/values.h"
#include "content/browser/media/webrtc_internals.h"
#include "content/browser/web_contents/web_contents_impl.h"
@@ -45,6 +46,18 @@
command_line->AppendSwitch(switches::kEnableAudioTrackProcessing);
}
+ virtual void TearDownOnMainThread() OVERRIDE {
+#if defined(OS_ANDROID)
+ // TODO(phoglund): this is a ugly workaround to let the IO thread
+ // finish its work. The reason we need this on Android is that
+ // content_browsertests tearDown logic is broken with respect
+ // to threading, which causes the IO thread to compete with the
+ // teardown. See http://crbug.com/362852. I also tried with 2
+ // seconds, but that isn't enough.
+ base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(5));
+#endif
+ }
+
// Convenience function since most peerconnection-call.html tests just load
// the page, kick off some javascript and wait for the title to change to OK.
void MakeTypicalPeerConnectionCall(const std::string& javascript) {
@@ -58,7 +71,7 @@
}
void DisableOpusIfOnAndroid() {
-#if defined (OS_ANDROID)
+#if defined(OS_ANDROID)
// Always force iSAC 16K on Android for now (Opus is broken).
EXPECT_EQ("isac-forced",
ExecuteJavascriptAndReturnResult("forceIsac16KInSdp();"));
« no previous file with comments | « trunk/src/build/android/pylib/gtest/filter/content_browsertests_disabled ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698