Bug 1333684 - Add tests that the GPU process is running. (bug 1333684, r=mattwoodrow) r=mattwoodrow a=test-only
authorDavid Anderson <danderson@mozilla.com>
Thu, 26 Jan 2017 16:26:10 -0800
changeset 375728 1f158e88b8669d86b20fd2e41fbbcbd325678930
parent 375727 55c6b21a6ff2df8e18dffc8dbd9e1bea4ca097fa
child 375729 bb6edc872722e8a6f5c19e7c3feadd3d3b905d65
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, mattwoodrow, test-only
bugs1333684
milestone53.0a2
Bug 1333684 - Add tests that the GPU process is running. (bug 1333684, r=mattwoodrow) r=mattwoodrow a=test-only
layout/reftests/layers/reftest.list
layout/tools/reftest/reftest.jsm
--- a/layout/reftests/layers/reftest.list
+++ b/layout/reftests/layers/reftest.list
@@ -17,8 +17,17 @@ skip-if(!asyncPan) != pull-background-di
 skip-if(!asyncPan) != pull-background-displayport-3.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 skip-if(!asyncPan) != pull-background-displayport-4.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 skip-if(!asyncPan) != pull-background-displayport-5.html about:blank
 skip-if(!asyncPan) != pull-background-displayport-6.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
 fuzzy(2,30150) == opacity-blending.html opacity-blending-ref.html
 fuzzy(16,5) == mask-layer-transform.html mask-layer-transform-ref.html
 fuzzy-if(gtkWidget,1,17) == forced-bg-color-outside-visible-region.html forced-bg-color-outside-visible-region-ref.html
 != layerize-over-fixed-bg-1.html about:blank
+
+# These tests check whether the GPU process is working. We expect it to work if:
+#   E10S is enabled, and
+#   Direct2D 1.1 works (as a proxy for Windows 7 SP1 + Platform Update or higher), OR
+#   The GPU process has been forced on.
+# If these conditions are met, but the GPU process is not on, these tests will turn on
+# and compare false.
+skip-if(!browserIsRemote||!d2d||gpuProcess) == data:text/plain,FAIL about:blank
+skip-if(!gpuProcessForceEnabled||gpuProcess) == data:text/plain,FAIL about:blank
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -746,16 +746,21 @@ function BuildConditionSandbox(aURL) {
 
     var prefs = CC["@mozilla.org/preferences-service;1"].
                 getService(CI.nsIPrefBranch);
     try {
         sandbox.nativeThemePref = !prefs.getBoolPref("mozilla.widget.disable-native-theme");
     } catch (e) {
         sandbox.nativeThemePref = true;
     }
+    try {
+        sandbox.gpuProcessForceEnabled = prefs.getBoolPref("layers.gpu-process.force-enabled");
+    } catch (e) {
+        sandbox.gpuProcessForceEnabled = false;
+    }
 
     sandbox.prefs = CU.cloneInto({
         getBoolPref: function(p) { return prefs.getBoolPref(p); },
         getIntPref:  function(p) { return prefs.getIntPref(p); }
     }, sandbox, { cloneFunctions: true });
 
     // Tests shouldn't care about this except for when they need to
     // crash the content process