diff --git a/core/core.services.yml b/core/core.services.yml
index 1449b3b..3f43289 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -157,13 +157,10 @@ services:
   path.alias_manager:
     class: Drupal\Core\Path\AliasManager
     arguments: ['@database', '@path.alias_whitelist', '@language_manager']
-  http_client_simpletest_subscriber:
-    class: Drupal\Core\Http\Plugin\SimpletestHttpRequestSubscriber
   http_default_client:
     class: Guzzle\Http\Client
     arguments: [null, { curl.CURLOPT_TIMEOUT: 30, curl.CURLOPT_MAXREDIRS: 3 }]
     calls:
-      - [addSubscriber, ['@http_client_simpletest_subscriber']]
       - [setUserAgent, ['Drupal (+http://drupal.org/)']]
   theme.negotiator:
     class: Drupal\Core\Theme\ThemeNegotiator
diff --git a/core/lib/Drupal/Core/Http/Plugin/SimpletestHttpRequestSubscriber.php b/core/lib/Drupal/Core/Http/Plugin/SimpletestHttpRequestSubscriber.php
index 6f5bfd1..2196a6b 100644
--- a/core/lib/Drupal/Core/Http/Plugin/SimpletestHttpRequestSubscriber.php
+++ b/core/lib/Drupal/Core/Http/Plugin/SimpletestHttpRequestSubscriber.php
@@ -18,12 +18,10 @@ class SimpletestHttpRequestSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents()
-  {
+  public static function getSubscribedEvents() {
     return array('request.before_send' => 'onBeforeSendRequest');
   }
 
-
   /**
    * Event callback for request.before_send
    */
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 265012e..0b105eb 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -752,6 +752,7 @@ protected function setUp() {
     // search path to the child site's search paths.
     // @see drupal_system_listing()
     $conf['simpletest_parent_profile'] = $this->originalProfile;
+    $conf['container_service_providers']['WebTestServiceProvider'] = 'Drupal\simpletest\WebTestServiceProvider';
 
     // Define information about the user 1 account.
     $this->root_user = new UserSession(array(
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestServiceProvider.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestServiceProvider.php
new file mode 100644
index 0000000..a829ca0
--- /dev/null
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestServiceProvider.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\simpletest\WebTestServiceProvider.
+ */
+
+namespace Drupal\simpletest;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceModifierInterface;
+use Drupal\Core\DependencyInjection\ServiceProviderInterface;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Service provider for web tests.
+ */
+class WebTestServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  function register(ContainerBuilder $container) {
+    // Add the simpletest subscriber for guzzle.
+    $container->register('http_client_simpletest_subscriber', 'Drupal\Core\Http\Plugin\SimpletestHttpRequestSubscriber');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+    // Overrides language_manager class to test domain language negotiation.
+    $definition = $container->getDefinition('http_default_client');
+    $definition->addMethodCall('addSubscriber', array(new Reference('http_client_simpletest_subscriber')));
+  }
+
+
+}
