diff --git a/DEPS b/DEPS
index 5465298..ebd6820 100644
--- a/DEPS
+++ b/DEPS
@@ -7,18 +7,6 @@
 }
 
 deps = {
-  'webrtc.DEPS/third_party/manifestdestiny':
-    Var('git_url') + '/chromium/deps/manifestdestiny.git@46ae53ac463e23bfefec374a81806355ea598ac4',
-  'webrtc.DEPS/third_party/mozdownload':
-    Var('git_url') + '/chromium/deps/mozdownload.git@5d3e0bf7851b093ff9a89d45f13185691c496be',
-  'webrtc.DEPS/third_party/mozinfo':
-    Var('git_url') + '/chromium/deps/mozinfo.git@f4cc257e21c48bc33dc1d12123d934a4dcaa120c',
-  'webrtc.DEPS/third_party/mozprocess':
-    Var('git_url') + '/chromium/deps/mozprocess.git@11d11bebc8517dcedec71f377cbec07fb91a3b1f',
-  'webrtc.DEPS/third_party/mozprofile':
-    Var('git_url') + '/chromium/deps/mozprofile.git@313295a0d9e1687dafa58e12f1f01b093a136446',
-  'webrtc.DEPS/third_party/mozrunner':
-    Var('git_url') + '/chromium/deps/mozrunner.git@efb11330692424f7aa5533839b0ae728bc5f30d1',
   'webrtc.DEPS/third_party/requests/':
     Var('git_url') + '/external/github.com/kennethreitz/requests.git@2128321b85dfd969498e5d1636dcc3c4a27917ba'
 }
@@ -78,14 +66,4 @@
                "--recursive",
                "src/chrome/test/data/webrtc/resources/tools"],
   },
-  {
-    # Download firefox for the Firefox AppRTC test.
-    # TODO(phoglund): Disabled due to http://crbug.com/545862.
-    "pattern": ".",
-    "action" : ["python",
-                "webrtc.DEPS/download_firefox_nightly.py",
-                "--clean-old-firefox-archives",
-                "--target-dir",
-                "firefox-nightly"],
-  },
 ]
diff --git a/download_firefox_nightly.py b/download_firefox_nightly.py
deleted file mode 100755
index 719d3d0..0000000
--- a/download_firefox_nightly.py
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Downloads a Firefox Nightly build for the current platform."""
-
-import datetime
-import glob
-import os
-import shutil
-import sys
-import subprocess
-import tarfile
-import time
-import zipfile
-
-from optparse import OptionParser
-
-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-THIRD_PARTY_DIR = os.path.abspath(os.path.join(BASE_DIR, 'third_party'))
-
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozdownload'))
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozinfo'))
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'requests'))
-
-from mozdownload import errors
-from mozdownload import scraper
-import utils
-
-
-def _Touch(a_file):
-  with open(a_file, 'a'):
-    os.utime(a_file, None)
-
-
-def _GetFirefoxArchivesSortedOnModifiedDate(target_dir):
-  firefox_archives = glob.glob(os.path.join(target_dir, '*tar.bz2'))
-  if not firefox_archives:
-    return None
-
-  firefox_archives.sort(key=os.path.getmtime, reverse=True)
-  return firefox_archives
-
-
-def _CleanOldFirefoxArchives(target_dir): 
-  firefox_archives = _GetFirefoxArchivesSortedOnModifiedDate(target_dir)
-  if not firefox_archives or len(firefox_archives) < 2:
-    return
-
-  # Keep the newest archive around as a fallback build and delete the rest.
-  rest = firefox_archives[1:]
-  print 'About to delete old Firefox archives %s.' % rest
-  for old_archive in rest:
-    try:
-      os.remove(old_archive)
-    except OSError:
-      pass
-
-
-def _FindFallbackFirefoxBuild(target_dir):
-  firefox_archives = _GetFirefoxArchivesSortedOnModifiedDate(target_dir)
-  if not firefox_archives:
-    return None, None
-
-  newest_build = firefox_archives[0]
-  build_age_seconds = time.time() - os.path.getmtime(newest_build)
-  build_age_days = datetime.timedelta(seconds=build_age_seconds).days
-
-  return newest_build, build_age_days
-
-
-def _MaybeDownload(target_dir, force):
-  try:
-    downloader = scraper.DailyScraper(destination=target_dir)
-    filename = downloader.build_filename(downloader.binary)
-    firefox_archive = os.path.join(target_dir, filename)
-
-    if os.path.exists(firefox_archive) and not force:
-      # Touch the file anyway since we were 'successful', so we can accurately
-      # compute the age of the most recent download attempt and act accordingly
-      # when a download fails later.
-      _Touch(firefox_archive)
-      print 'Skipping download as %s is already downloaded.' % firefox_archive
-      return None
-
-    downloader.download()
-    print 'Downloaded %s' % firefox_archive
-    return firefox_archive
-  except errors.NotFoundError as exception:
-    print 'Failed to download firefox: %s.' % exception
-    fallback_build, age_days = _FindFallbackFirefoxBuild(target_dir)
-
-    if not fallback_build:
-      raise Exception('We failed to download Firefox and we have no builds to '
-                      'fall back on; failing...')
-    if age_days > 3:
-      raise Exception('We have failed to download firefox builds for more '
-                      'than 3 days now: failing so someone looks at it. The '
-                      'most recent build we have is %d days old.' % age_days)
-
-    print 'Using %s instead; it is %d days old.' % (fallback_build, age_days)
-    return fallback_build
-
-
-def _ExtractArchive(firefox_archive, target_dir):
-  if utils.GetPlatform() is 'linux':
-    tar_archive = tarfile.open(firefox_archive, 'r:bz2')
-    tar_archive.extractall(path=target_dir)
-  else:
-    raise Exception('Unsupported platform: %s' % sys.platform)
-
-  print 'Extracted %s' % firefox_archive
-
-
-def main():
-  usage = 'usage: %prog -t <target_dir>'
-  parser = OptionParser(usage)
-  parser.add_option('-t', '--target-dir',
-                    help=('Target directory to put the downloaded and extracted'
-                          ' folder with the Firefox Nightly build in.'))
-  parser.add_option('-f', '--force', action='store_true',
-                    help=('Force download even if the current nightly is '
-                          'already downloaded.'))
-  parser.add_option('-c', '--clean-old-firefox-archives', action='store_true',
-                    help=('Clean old firefox archives; one will always be '
-                          'kept as a fallback.'))
-  options, _args = parser.parse_args()
-  if not options.target_dir:
-    parser.error('You must specify the target directory.')
-
-  if utils.GetPlatform() is not 'linux':
-    print 'This script is only supported on Linux for now.'
-    return
-
-  target_dir = options.target_dir
-  if not os.path.isdir(target_dir):
-    os.mkdir(target_dir)
-
-  firefox_archive = _MaybeDownload(target_dir, options.force)
-  if firefox_archive:
-    _ExtractArchive(firefox_archive, target_dir) 
-
-  if options.clean_old_firefox_archives:
-    _CleanOldFirefoxArchives(target_dir)
-
-if __name__ == '__main__':
-  sys.exit(main())
diff --git a/run_firefox_webrtc.py b/run_firefox_webrtc.py
deleted file mode 100755
index c96c6de..0000000
--- a/run_firefox_webrtc.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Launches Firefox and browses to an URL."""
-
-import os
-import signal
-import sys
-
-from optparse import OptionParser
-
-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-THIRD_PARTY_DIR = os.path.abspath(os.path.join(BASE_DIR, 'third_party'))
-
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'manifestdestiny'))
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozinfo'))
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozprocess'))
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozprofile'))
-sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozrunner'))
-
-from mozprofile import profile
-import mozrunner
-
-WEBRTC_PREFERENCES = {
-    # Automatically gives permission to access the camera/microphone and
-    # bypasses the permission/selection dialog.
-    'media.navigator.permission.disabled': True,
-
-    # TODO(phoglund): Disable e10s to see if we're still affected by
-    # the sandbox audio issue.
-    'browser.tabs.remote.autostart': False,
-}
-
-def main():
-  usage = 'usage: %prog --binary <firefox_executable> --webpage <url>'
-  parser = OptionParser(usage)
-  parser.add_option('-b', '--binary',
-                    help=('Firefox executable to run.'))
-  parser.add_option('-w', '--webpage',
-                    help=('Web page to browse to.'))
-  options, _args = parser.parse_args()
-  if not options.binary:
-    parser.error('You must specify the Firefox browser executable.')
-  if not options.webpage:
-    parser.error('You must specify the web page to browse to.')
-
-  firefox_profile = profile.FirefoxProfile(preferences=WEBRTC_PREFERENCES)
-  firefox_runner = mozrunner.FirefoxRunner(profile=firefox_profile,
-                                           binary=options.binary,
-                                           cmdargs=[options.webpage])
-  def KillFirefox(signum, frame):
-    firefox_runner.stop()
-  signal.signal(signal.SIGTERM, KillFirefox)
-
-  firefox_runner.start()
-
-  # Run until Chrome kills us.
-  firefox_runner.process_handler.wait(timeout=600)
-  return 0
-
-if __name__ == '__main__':
-  sys.exit(main())
