Add tests that the GPU process is running. (bug 1333684, r=mattwoodrow)

--HG--
extra : rebase_source : 436bcdaba4019040ce36a53e60f15a90e0131df7
This commit is contained in:
David Anderson 2017-01-26 16:26:10 -08:00
parent 65216b775b
commit ef0d2650f7
2 changed files with 14 additions and 0 deletions

View File

@ -22,3 +22,12 @@ 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

View File

@ -751,6 +751,11 @@ function BuildConditionSandbox(aURL) {
} 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); },