Backed out changesets 58db1fb509be and 7301ccf7e0be (bug 947391) for Android xpcshell orange.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 18 Dec 2013 19:41:29 -0500
changeset 161190 f12f6b1c64cb7d6b121a6a8c85ba68cb8fe520fd
parent 161189 a6f4adade9df75711e2aefeed860255ffd16e1a4
child 161191 7d120481a6ae7c4714ca6c8e9880d492b7aaae53
child 161192 86eb809847a34eb495b806bdfeec0bad3abaedef
push id25869
push userkwierso@gmail.com
push dateThu, 19 Dec 2013 04:49:41 +0000
treeherdermozilla-central@7d120481a6ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs947391
milestone29.0a1
backs out58db1fb509befb43dd7ae15ef621fab33013448f
7301ccf7e0be424a1d0079241f370311063c4c7e
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changesets 58db1fb509be and 7301ccf7e0be (bug 947391) for Android xpcshell orange.
content/base/src/nsXMLHttpRequest.cpp
modules/libpref/src/init/all.js
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpBaseChannel.h
netwerk/protocol/http/nsAHttpTransaction.h
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnection.h
netwerk/protocol/http/nsHttpHandler.cpp
netwerk/protocol/http/nsHttpHandler.h
netwerk/protocol/http/nsHttpTransaction.cpp
netwerk/protocol/http/nsHttpTransaction.h
netwerk/protocol/http/nsIHttpChannelInternal.idl
netwerk/test/unit/test_httpResponseTimeout.js
netwerk/test/unit/xpcshell.ini
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -2753,19 +2753,16 @@ nsXMLHttpRequest::Send(nsIVariant* aVari
 
   nsCOMPtr<nsIHttpChannelInternal>
     internalHttpChannel(do_QueryInterface(mChannel));
   if (internalHttpChannel) {
     // we never let XHR be blocked by head CSS/JS loads to avoid
     // potential deadlock where server generation of CSS/JS requires
     // an XHR signal.
     internalHttpChannel->SetLoadUnblocked(true);
-
-    // Disable Necko-internal response timeouts.
-    internalHttpChannel->SetResponseTimeoutEnabled(false);
   }
 
   nsCOMPtr<nsIStreamListener> listener = this;
   if (!IsSystemXHR()) {
     // Always create a nsCORSListenerProxy here even if it's
     // a same-origin request right now, since it could be redirected.
     nsRefPtr<nsCORSListenerProxy> corsListener =
       new nsCORSListenerProxy(listener, mPrincipal, withCredentials);
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -875,19 +875,16 @@ pref("network.http.default-socket-type",
 
 // There is a problem with some IIS7 servers that don't close the connection
 // properly after it times out (bug #491541). Default timeout on IIS7 is
 // 120 seconds. We need to reuse or drop the connection within this time.
 // We set the timeout a little shorter to keep a reserve for cases when
 // the packet is lost or delayed on the route.
 pref("network.http.keep-alive.timeout", 115);
 
-// Timeout connections if an initial response is not received after 10 mins.
-pref("network.http.response.timeout", 300);
-
 // Limit the absolute number of http connections.
 // Note: the socket transport service will clamp the number below 256 if the OS
 // cannot allocate that many FDs, and it also always tries to reserve up to 250
 // file descriptors for things other than sockets.   
 pref("network.http.max-connections", 256);
 
 // If NOT connecting via a proxy, then
 // a new connection will only be attempted if the number of active persistent
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -52,17 +52,16 @@ HttpBaseChannel::HttpBaseChannel()
   , mChooseApplicationCache(false)
   , mLoadedFromApplicationCache(false)
   , mChannelIsForDownload(false)
   , mTracingEnabled(true)
   , mTimingEnabled(false)
   , mAllowSpdy(true)
   , mLoadAsBlocking(false)
   , mLoadUnblocked(false)
-  , mResponseTimeoutEnabled(true)
   , mSuspendCount(0)
   , mProxyResolveFlags(0)
   , mContentDispositionHint(UINT32_MAX)
   , mHttpHandler(gHttpHandler)
 {
   LOG(("Creating HttpBaseChannel @%x\n", this));
 
   // Subfields of unions cannot be targeted in an initializer list
@@ -1528,33 +1527,16 @@ HttpBaseChannel::SetLoadUnblocked(bool a
 NS_IMETHODIMP
 HttpBaseChannel::GetApiRedirectToURI(nsIURI ** aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   NS_IF_ADDREF(*aResult = mAPIRedirectToURI);
   return NS_OK;
 }
 
-NS_IMETHODIMP
-HttpBaseChannel::GetResponseTimeoutEnabled(bool *aEnable)
-{
-  if (NS_WARN_IF(!aEnable)) {
-    return NS_ERROR_NULL_POINTER;
-  }
-  *aEnable = mResponseTimeoutEnabled;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-HttpBaseChannel::SetResponseTimeoutEnabled(bool aEnable)
-{
-  mResponseTimeoutEnabled = aEnable;
-  return NS_OK;
-}
-
 //-----------------------------------------------------------------------------
 // HttpBaseChannel::nsISupportsPriority
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 HttpBaseChannel::GetPriority(int32_t *value)
 {
   *value = mPriority;
--- a/netwerk/protocol/http/HttpBaseChannel.h
+++ b/netwerk/protocol/http/HttpBaseChannel.h
@@ -151,18 +151,16 @@ public:
   NS_IMETHOD SetAllowSpdy(bool aAllowSpdy);
   NS_IMETHOD GetLoadAsBlocking(bool *aLoadAsBlocking);
   NS_IMETHOD SetLoadAsBlocking(bool aLoadAsBlocking);
   NS_IMETHOD GetLoadUnblocked(bool *aLoadUnblocked);
   NS_IMETHOD SetLoadUnblocked(bool aLoadUnblocked);
   NS_IMETHOD GetApiRedirectToURI(nsIURI * *aApiRedirectToURI);
   NS_IMETHOD AddSecurityMessage(const nsAString &aMessageTag, const nsAString &aMessageCategory);
   NS_IMETHOD TakeAllSecurityMessages(nsCOMArray<nsISecurityConsoleMessage> &aMessages);
-  NS_IMETHOD GetResponseTimeoutEnabled(bool *aEnable);
-  NS_IMETHOD SetResponseTimeoutEnabled(bool aEnable);
 
   inline void CleanRedirectCacheChainIfNecessary()
   {
       mRedirectedCachekeys = nullptr;
   }
   NS_IMETHOD HTTPUpgrade(const nsACString & aProtocolName,
                          nsIHttpUpgradeListener *aListener);
 
@@ -294,17 +292,16 @@ protected:
   uint32_t                          mLoadedFromApplicationCache : 1;
   uint32_t                          mChannelIsForDownload       : 1;
   uint32_t                          mTracingEnabled             : 1;
   // True if timing collection is enabled
   uint32_t                          mTimingEnabled              : 1;
   uint32_t                          mAllowSpdy                  : 1;
   uint32_t                          mLoadAsBlocking             : 1;
   uint32_t                          mLoadUnblocked              : 1;
-  uint32_t                          mResponseTimeoutEnabled     : 1;
 
   // Current suspension depth for this channel object
   uint32_t                          mSuspendCount;
 
   nsCOMPtr<nsIURI>                  mAPIRedirectToURI;
   nsAutoPtr<nsTArray<nsCString> >   mRedirectedCachekeys;
 
   uint32_t                          mProxyResolveFlags;
--- a/netwerk/protocol/http/nsAHttpTransaction.h
+++ b/netwerk/protocol/http/nsAHttpTransaction.h
@@ -119,18 +119,16 @@ public:
     // equivalent to !!dynamic_cast<NullHttpTransaction *>(this)
     // A null transaction is expected to return BASE_STREAM_CLOSED on all of
     // its IO functions all the time.
     virtual bool IsNullTransaction() { return false; }
 
     // return the load group connection information associated with the transaction
     virtual nsILoadGroupConnectionInfo *LoadGroupConnectionInfo() { return nullptr; }
 
-    virtual bool ResponseTimeoutEnabled() const { return false; }
-
     // Every transaction is classified into one of the types below. When using
     // HTTP pipelines, only transactions with the same type appear on the same
     // pipeline.
     enum Classifier  {
         // Transactions that expect a short 304 (no-content) response
         CLASS_REVALIDATION,
 
         // Transactions for content expected to be CSS or JS
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -64,17 +64,16 @@ nsHttpConnection::nsHttpConnection()
     , mNPNComplete(false)
     , mSetupSSLCalled(false)
     , mUsingSpdyVersion(0)
     , mPriority(nsISupportsPriority::PRIORITY_NORMAL)
     , mReportedSpdy(false)
     , mEverUsedSpdy(false)
     , mLastHttpResponseVersion(NS_HTTP_VERSION_1_1)
     , mTransactionCaps(0)
-    , mResponseTimeoutEnabled(false)
 {
     LOG(("Creating nsHttpConnection @%x\n", this));
 }
 
 nsHttpConnection::~nsHttpConnection()
 {
     LOG(("Destroying nsHttpConnection @%x\n", this));
 
@@ -340,19 +339,16 @@ nsHttpConnection::Activate(nsAHttpTransa
     }
 
     // Clear the per activation counter
     mCurrentBytesRead = 0;
 
     // The overflow state is not needed between activations
     mInputOverflow = nullptr;
 
-    mResponseTimeoutEnabled = mHttpHandler->ResponseTimeout() > 0 &&
-                              mTransaction->ResponseTimeoutEnabled();
-
     rv = OnOutputStreamReady(mSocketOut);
 
 failed_activation:
     if (NS_FAILED(rv)) {
         mTransaction = nullptr;
     }
 
     return rv;
@@ -951,32 +947,16 @@ nsHttpConnection::ReadTimeoutTick(PRInte
         return;
 
     // Spdy implements some timeout handling using the SPDY ping frame.
     if (mSpdySession) {
         mSpdySession->ReadTimeoutTick(now);
         return;
     }
 
-    // Timeout if the response is taking too long to arrive.
-    if (mResponseTimeoutEnabled) {
-        PRIntervalTime initialResponseDelta = now - mLastWriteTime;
-        if (initialResponseDelta > gHttpHandler->ResponseTimeout()) {
-            LOG(("canceling transaction: no response for %ums: timeout is %dms\n",
-                 PR_IntervalToMilliseconds(initialResponseDelta),
-                 PR_IntervalToMilliseconds(gHttpHandler->ResponseTimeout())));
-
-            mResponseTimeoutEnabled = false;
-
-            // This will also close the connection
-            CloseTransaction(mTransaction, NS_ERROR_NET_TIMEOUT);
-            return;
-        }
-    }
-
     if (!gHttpHandler->GetPipelineRescheduleOnTimeout())
         return;
 
     PRIntervalTime delta = now - mLastReadTime;
 
     // we replicate some of the checks both here and in OnSocketReadable() as
     // they will be discovered under different conditions. The ones here
     // will generally be discovered if we are totally hung and OSR does
--- a/netwerk/protocol/http/nsHttpConnection.h
+++ b/netwerk/protocol/http/nsHttpConnection.h
@@ -273,13 +273,11 @@ private:
     // mUsingSpdyVersion is cleared when mSpdySession is freed, this is permanent
     bool                            mEverUsedSpdy;
 
     // mLastHttpResponseVersion stores the last response's http version seen.
     uint8_t                         mLastHttpResponseVersion;
 
     // The capabailities associated with the most recent transaction
     uint32_t                        mTransactionCaps;
-
-    bool                            mResponseTimeoutEnabled;
 };
 
 #endif // nsHttpConnection_h__
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -145,17 +145,16 @@ nsHttpHandler::nsHttpHandler()
     , mReferrerLevel(0xff) // by default we always send a referrer
     , mSpoofReferrerSource(false)
     , mReferrerTrimmingPolicy(0)
     , mReferrerXOriginPolicy(0)
     , mFastFallbackToIPv4(false)
     , mProxyPipelining(true)
     , mIdleTimeout(PR_SecondsToInterval(10))
     , mSpdyTimeout(PR_SecondsToInterval(180))
-    , mResponseTimeout(PR_SecondsToInterval(600))
     , mMaxRequestAttempts(10)
     , mMaxRequestDelay(10)
     , mIdleSynTimeout(250)
     , mPipeliningEnabled(false)
     , mMaxConnections(24)
     , mMaxPersistentConnectionsPerServer(2)
     , mMaxPersistentConnectionsPerProxy(4)
     , mMaxPipelinedRequests(32)
@@ -859,22 +858,16 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
         if (NS_SUCCEEDED(rv)) {
             mMaxRequestDelay = (uint16_t) clamped(val, 0, 0xffff);
             if (mConnMgr)
                 mConnMgr->UpdateParam(nsHttpConnectionMgr::MAX_REQUEST_DELAY,
                                       mMaxRequestDelay);
         }
     }
 
-    if (PREF_CHANGED(HTTP_PREF("response.timeout"))) {
-        rv = prefs->GetIntPref(HTTP_PREF("response.timeout"), &val);
-        if (NS_SUCCEEDED(rv))
-            mResponseTimeout = PR_SecondsToInterval(clamped(val, 0, 0xffff));
-    }
-
     if (PREF_CHANGED(HTTP_PREF("max-connections"))) {
         rv = prefs->GetIntPref(HTTP_PREF("max-connections"), &val);
         if (NS_SUCCEEDED(rv)) {
 
             mMaxConnections = (uint16_t) clamped((uint32_t)val,
                                                  (uint32_t)1, MaxSocketCount());
 
             if (mConnMgr)
--- a/netwerk/protocol/http/nsHttpHandler.h
+++ b/netwerk/protocol/http/nsHttpHandler.h
@@ -78,17 +78,16 @@ public:
     uint8_t        ReferrerLevel()           { return mReferrerLevel; }
     bool           SpoofReferrerSource()     { return mSpoofReferrerSource; }
     uint8_t        ReferrerTrimmingPolicy()  { return mReferrerTrimmingPolicy; }
     uint8_t        ReferrerXOriginPolicy()   { return mReferrerXOriginPolicy; }
     bool           SendSecureXSiteReferrer() { return mSendSecureXSiteReferrer; }
     uint8_t        RedirectionLimit()        { return mRedirectionLimit; }
     PRIntervalTime IdleTimeout()             { return mIdleTimeout; }
     PRIntervalTime SpdyTimeout()             { return mSpdyTimeout; }
-    PRIntervalTime ResponseTimeout()         { return mResponseTimeout; }
     uint16_t       MaxRequestAttempts()      { return mMaxRequestAttempts; }
     const char    *DefaultSocketType()       { return mDefaultSocketType.get(); /* ok to return null */ }
     uint32_t       PhishyUserPassLength()    { return mPhishyUserPassLength; }
     uint8_t        GetQoSBits()              { return mQoSBits; }
     uint16_t       GetIdleSynTimeout()       { return mIdleSynTimeout; }
     bool           FastFallbackToIPv4()      { return mFastFallbackToIPv4; }
     bool           ProxyPipelining()         { return mProxyPipelining; }
     uint32_t       MaxSocketCount();
@@ -332,17 +331,16 @@ private:
     uint8_t  mSpoofReferrerSource;
     uint8_t  mReferrerTrimmingPolicy;
     uint8_t  mReferrerXOriginPolicy;
 
     bool mFastFallbackToIPv4;
     bool mProxyPipelining;
     PRIntervalTime mIdleTimeout;
     PRIntervalTime mSpdyTimeout;
-    PRIntervalTime mResponseTimeout;
 
     uint16_t mMaxRequestAttempts;
     uint16_t mMaxRequestDelay;
     uint16_t mIdleSynTimeout;
 
     bool     mPipeliningEnabled;
     uint16_t mMaxConnections;
     uint8_t  mMaxPersistentConnectionsPerServer;
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -24,17 +24,16 @@
 #include "mozilla/VisualEventTracer.h"
 
 #include "nsComponentManagerUtils.h" // do_CreateInstance
 #include "nsServiceManagerUtils.h"   // do_GetService
 #include "nsIHttpActivityObserver.h"
 #include "nsSocketTransportService2.h"
 #include "nsICancelable.h"
 #include "nsIEventTarget.h"
-#include "nsIHttpChannelInternal.h"
 #include "nsIInputStream.h"
 #include "nsITransport.h"
 #include "nsIOService.h"
 #include <algorithm>
 
 #ifdef MOZ_WIDGET_GONK
 #include "nsINetworkStatsServiceProxy.h"
 #endif
@@ -114,17 +113,16 @@ nsHttpTransaction::nsHttpTransaction()
     , mSentData(false)
     , mReceivedData(false)
     , mStatusEventPending(false)
     , mHasRequestBody(false)
     , mProxyConnectFailed(false)
     , mHttpResponseMatched(false)
     , mPreserveStream(false)
     , mDispatchedAsBlocking(false)
-    , mResponseTimeoutEnabled(true)
     , mReportedStart(false)
     , mReportedResponseHeader(false)
     , mForTakeResponseHead(nullptr)
     , mResponseHeadTaken(false)
     , mSubmittedRatePacing(false)
     , mPassedRatePacing(false)
     , mSynchronousRatePaceRequest(false)
     , mCountRecv(0)
@@ -243,26 +241,16 @@ nsHttpTransaction::Init(uint32_t caps,
     if (mAppId != NECKO_NO_APP_ID) {
         nsCOMPtr<nsINetworkInterface> activeNetwork;
         NS_GetActiveNetworkInterface(activeNetwork);
         mActiveNetwork =
             new nsMainThreadPtrHolder<nsINetworkInterface>(activeNetwork);
     }
 #endif
 
-    nsCOMPtr<nsIHttpChannelInternal> httpChannelInternal =
-        do_QueryInterface(eventsink);
-    if (httpChannelInternal) {
-        rv = httpChannelInternal->GetResponseTimeoutEnabled(
-            &mResponseTimeoutEnabled);
-        if (NS_WARN_IF(NS_FAILED(rv))) {
-            return rv;
-        }
-    }
-
     // create transport event sink proxy. it coalesces all events if and only
     // if the activity observer is not active. when the observer is active
     // we need not to coalesce any events to get all expected notifications
     // of the transaction state, necessary for correct debugging and logging.
     rv = net_NewTransportEventSinkProxy(getter_AddRefs(mTransportSink),
                                         eventsink, target,
                                         !activityDistributorActive);
     if (NS_FAILED(rv)) return rv;
--- a/netwerk/protocol/http/nsHttpTransaction.h
+++ b/netwerk/protocol/http/nsHttpTransaction.h
@@ -139,20 +139,16 @@ private:
 
     static NS_METHOD ReadRequestSegment(nsIInputStream *, void *, const char *,
                                         uint32_t, uint32_t, uint32_t *);
     static NS_METHOD WritePipeSegment(nsIOutputStream *, void *, char *,
                                       uint32_t, uint32_t, uint32_t *);
 
     bool TimingEnabled() const { return mCaps & NS_HTTP_TIMING_ENABLED; }
 
-    bool ResponseTimeoutEnabled() const MOZ_OVERRIDE MOZ_FINAL {
-      return mResponseTimeoutEnabled;
-    }
-
 private:
     class UpdateSecurityCallbacks : public nsRunnable
     {
       public:
         UpdateSecurityCallbacks(nsHttpTransaction* aTrans,
                                 nsIInterfaceRequestor* aCallbacks)
         : mTrans(aTrans), mCallbacks(aCallbacks) {}
 
@@ -239,17 +235,16 @@ private:
     bool                            mSentData;
     bool                            mReceivedData;
     bool                            mStatusEventPending;
     bool                            mHasRequestBody;
     bool                            mProxyConnectFailed;
     bool                            mHttpResponseMatched;
     bool                            mPreserveStream;
     bool                            mDispatchedAsBlocking;
-    bool                            mResponseTimeoutEnabled;
 
     // mClosed           := transaction has been explicitly closed
     // mTransactionDone  := transaction ran to completion or was interrupted
     // mResponseComplete := transaction ran to completion
 
     // For Restart-In-Progress Functionality
     bool                            mReportedStart;
     bool                            mReportedResponseHeader;
--- a/netwerk/protocol/http/nsIHttpChannelInternal.idl
+++ b/netwerk/protocol/http/nsIHttpChannelInternal.idl
@@ -177,19 +177,13 @@ interface nsIHttpChannelInternal : nsISu
     /**
      * If set, this channel will load in parallel with the rest of the load
      * group even if a blocking subset of the group would normally be given
      * exclusivity. Default false.
      */
     attribute boolean loadUnblocked;
 
     /**
-     * This attribute en/disables the timeout for the first byte of an HTTP
-     * response. Enabled by default.
-     */
-    attribute boolean responseTimeoutEnabled;
-
-    /**
      * Get value of the URI passed to nsIHttpChannel.redirectTo() if any.
      * May return null when redirectTo() has not been called.
      */
     readonly attribute nsIURI apiRedirectToURI;
 };
deleted file mode 100644
--- a/netwerk/test/unit/test_httpResponseTimeout.js
+++ /dev/null
@@ -1,89 +0,0 @@
-Cu.import("resource://testing-common/httpd.js");
-
-const SERVER_PORT = 8080;
-const baseURL = "http://localhost:" + SERVER_PORT + "/";
-const kResponseTimeoutPref = "network.http.response.timeout";
-const kResponseTimeout = 1;
-
-const prefService = Cc["@mozilla.org/preferences-service;1"]
-                       .getService(Ci.nsIPrefBranch);
-
-var server = new HttpServer();
-
-function TimeoutListener(enableTimeout, nextTest) {
-  this.enableTimeout = enableTimeout;
-  this.nextTest = nextTest;
-}
-
-TimeoutListener.prototype = {
-  onStartRequest: function (request, ctx) {
-  },
-
-  onDataAvailable: function (request, ctx, stream) {
-  },
-
-  onStopRequest: function (request, ctx, status) {
-    if (this.enableTimeout) {
-      do_check_eq(status, Cr.NS_ERROR_NET_TIMEOUT);
-    } else {
-      do_check_eq(status, Cr.NS_OK);
-    }
-
-    if (this.nextTest) {
-      this.nextTest();
-    } else {
-      server.stop(serverStopListener);
-    }
-  },
-};
-
-function serverStopListener() {
-  do_test_finished();
-}
-
-function testTimeout(timeoutEnabled, nextTest) {
-  // Set timeout pref.
-  if (timeoutEnabled) {
-    prefService.setIntPref(kResponseTimeoutPref, kResponseTimeout);
-  } else {
-    prefService.setIntPref(kResponseTimeoutPref, 0);
-  }
-
-  var ios = Cc["@mozilla.org/network/io-service;1"]
-  .getService(Ci.nsIIOService);
-  var chan = ios.newChannel(baseURL, null, null)
-  .QueryInterface(Ci.nsIHttpChannel);
-  var listener = new TimeoutListener(timeoutEnabled, nextTest);
-  chan.asyncOpen(listener, null);
-}
-
-function testTimeoutEnabled() {
-  testTimeout(true, testTimeoutDisabled);
-}
-
-function testTimeoutDisabled() {
-  testTimeout(false, null);
-}
-
-function run_test() {
-  // Start server; will be stopped after second test.
-  server.start(SERVER_PORT);
-  server.registerPathHandler('/', function(metadata, response) {
-    // Wait until the timeout should have passed, then respond.
-    response.processAsync();
-    timer = Cc["@mozilla.org/timer;1"]
-    .createInstance(Components.interfaces.nsITimer);
-    timer.initWithCallback(function() {
-      response.setStatusLine(metadata.httpVersion, 200, "OK");
-      response.write("Hello world");
-      response.finish();
-    }, (kResponseTimeout+1)*1000 /* ms */, Ci.nsITimer.TYPE_ONE_SHOT);
-  });
-
-  // First test checks timeout enabled.
-  // Second test (in callback) checks timeout disabled.
-  testTimeoutEnabled();
-
-  do_test_pending();
-}
-
--- a/netwerk/test/unit/xpcshell.ini
+++ b/netwerk/test/unit/xpcshell.ini
@@ -203,17 +203,16 @@ skip-if = os == "android"
 # Bug 675039: intermittent fail on Android-armv6 
 skip-if = os == "android"
 [test_head.js]
 [test_header_Accept-Language.js]
 [test_headers.js]
 [test_http_headers.js]
 [test_httpauth.js]
 [test_httpcancel.js]
-[test_httpResponseTimeout.js]
 [test_httpsuspend.js]
 [test_idnservice.js]
 [test_idn_urls.js]
 [test_invalidport.js]
 [test_localstreams.js]
 [test_mismatch_last-modified.js]
 [test_MIME_params.js]
 [test_mozTXTToHTMLConv.js]