Bug 1262954 - Explicitly set the 'layers.acceleration.disabled' pref to true on Windows XP e10s test runs. r=ahal
authorJoel Maher <jmaher@mozilla.com>
Fri, 08 Apr 2016 14:46:25 -0400
changeset 316440 36ab144acccbb72c5f435b7006e01480d2a852f7
parent 316439 5ccb2887c57f47eff0ab1698959d2ebc5a602585
child 316441 61ca2f5fd6967f16a01442e4a731ff94a317b63b
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1262954
milestone48.0a1
Bug 1262954 - Explicitly set the 'layers.acceleration.disabled' pref to true on Windows XP e10s test runs. r=ahal MozReview-Commit-ID: 2KsBZDNvsdU
layout/tools/reftest/runreftest.py
testing/mochitest/runtests.py
testing/talos/talos/run_tests.py
testing/talos/talos/ttest.py
testing/web-platform/harness/wptrunner/browsers/firefox.py
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -5,16 +5,17 @@
 """
 Runs the reftest test harness.
 """
 
 import collections
 import json
 import multiprocessing
 import os
+import platform
 import re
 import shutil
 import signal
 import subprocess
 import sys
 import threading
 
 SCRIPT_DIRECTORY = os.path.abspath(
@@ -278,16 +279,21 @@ class RefTest(object):
         prefs['reftest.focusFilterMode'] = options.focusFilterMode
         prefs['reftest.logLevel'] = options.log_tbpl_level or 'info'
         prefs['reftest.manifests'] = json.dumps(manifests)
 
         if options.e10s:
             prefs['browser.tabs.remote.autostart'] = True
             prefs['extensions.e10sBlocksEnabling'] = False
 
+        # Bug 1262954: For winXP + e10s disable acceleration
+        if platform.system() in ("Windows", "Microsoft") and \
+           '5.1' in platform.version() and options.e10s:
+            prefs['layers.acceleration.disabled'] = True
+
         if options.marionette:
             port = options.marionette.split(':')[1]
             prefs['marionette.defaultPrefs.port'] = int(port)
 
         preference_file = os.path.join(here, 'reftest-preferences.js')
         prefs.update(mozprofile.Preferences.read_prefs(preference_file))
 
         for v in options.extraPrefs:
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -17,16 +17,17 @@ import ctypes
 import glob
 import json
 import mozcrash
 import mozdebug
 import mozinfo
 import mozprocess
 import mozrunner
 import numbers
+import platform
 import re
 import shutil
 import signal
 import subprocess
 import sys
 import tempfile
 import time
 import traceback
@@ -1627,16 +1628,21 @@ class MochitestDesktop(MochitestBase):
                                          'prefs_b2g_unittest.js')]
 
         prefs = {}
         for path in preferences:
             prefs.update(Preferences.read_prefs(path))
 
         prefs.update(self.extraPrefs(options.extraPrefs))
 
+        # Bug 1262954: For windows XP + e10s disable acceleration
+        if platform.system() in ("Windows", "Microsoft") and \
+           '5.1' in platform.version() and options.e10s:
+            prefs['layers.acceleration.disabled'] = True
+
         # interpolate preferences
         interpolation = {
             "server": "%s:%s" %
             (options.webServer, options.httpPort)}
 
         # TODO: Remove OOP once bug 1072443 is fixed
         if mozinfo.info.get('buildapp') == 'mulet':
             interpolation["OOP"] = "false"
--- a/testing/talos/talos/run_tests.py
+++ b/testing/talos/talos/run_tests.py
@@ -108,23 +108,18 @@ def run_tests(config, browser_config):
     if browser_config['develop']:
         browser_config['extra_args'] = '--no-remote'
 
     # with addon signing for production talos, we want to develop without it
     if browser_config['develop'] or browser_config['branch_name'] == 'Try':
         browser_config['preferences']['xpinstall.signatures.required'] = False
 
     # set defaults
-    title = config.get('title', '')
     testdate = config.get('testdate', '')
 
-    if browser_config['e10s'] and not title.endswith(".e"):
-        # we are running in e10s mode
-        title = "%s.e" % (title,)
-
     # get the process name from the path to the browser
     if not browser_config['process']:
         browser_config['process'] = \
             os.path.basename(browser_config['browser_path'])
 
     # fix paths to substitute
     # `os.path.dirname(os.path.abspath(__file__))` for ${talos}
     # https://bugzilla.mozilla.org/show_bug.cgi?id=705809
--- a/testing/talos/talos/ttest.py
+++ b/testing/talos/talos/ttest.py
@@ -55,16 +55,22 @@ class TTest(object):
             browser_config:  Dictionary of configuration options for the
                              browser (paths, prefs, etc)
             test_config   :  Dictionary of configuration for the given
                              test (url, cycles, counters, etc)
 
         """
 
         LOG.debug("operating with platform_type : %s" % self.platform_type)
+
+        # Bug 1262954: winxp + e10s, disable hwaccel
+        if self.platform_type == "win_" and browser_config['e10s']:
+            prefs = browser_config['preferences']
+            prefs['layers.acceleration.disabled'] = True
+
         with FFSetup(browser_config, test_config) as setup:
             return self._runTest(browser_config, test_config, setup)
 
     def _runTest(self, browser_config, test_config, setup):
         minidump_dir = os.path.join(setup.profile_dir, 'minidumps')
         counters = test_config.get(self.platform_type + 'counters', [])
         resolution = test_config['resolution']
 
--- a/testing/web-platform/harness/wptrunner/browsers/firefox.py
+++ b/testing/web-platform/harness/wptrunner/browsers/firefox.py
@@ -1,13 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import os
+import platform
 import subprocess
 import sys
 
 import mozinfo
 from mozprocess import ProcessHandler
 from mozprofile import FirefoxProfile, Preferences
 from mozprofile.permissions import ServerLocations
 from mozrunner import FirefoxRunner
@@ -115,16 +116,21 @@ class FirefoxBrowser(Browser):
                                       preferences=preferences)
         self.profile.set_preferences({"marionette.defaultPrefs.enabled": True,
                                       "marionette.defaultPrefs.port": self.marionette_port,
                                       "dom.disable_open_during_load": False,
                                       "network.dns.localDomains": ",".join(hostnames)})
         if self.e10s:
             self.profile.set_preferences({"browser.tabs.remote.autostart": True})
 
+        # Bug 1262954: winxp + e10s, disable hwaccel
+        if self.e10s and platform.system() in ("Windows", "Microsoft") and \
+           '5.1' in platform.version():
+            self.profile.set_preferences({"layers.acceleration.disabled": True})
+
         if self.ca_certificate_path is not None:
             self.setup_ssl()
 
         debug_args, cmd = browser_command(self.binary, [cmd_arg("marionette"), "about:blank"],
                                           self.debug_info)
 
         self.runner = FirefoxRunner(profile=self.profile,
                                     binary=cmd[0],