Bug 1395762 - Update Stylo check in file_restyling_xhr_doc.html. r=birtles
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 31 Aug 2017 18:57:25 -0500
changeset 378148 001d66bec22f15c253e21306c72d04b518b94dd0
parent 378147 b28fb20723996f86bdf9c1e9e53839f82ca5c353
child 378149 b18cad4e3274cb2a6b92eb95779f099b79c4fd5d
push id94412
push userarchaeopteryx@coole-files.de
push dateFri, 01 Sep 2017 08:46:09 +0000
treeherdermozilla-inbound@d56571d7f1be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1395762
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1395762 - Update Stylo check in file_restyling_xhr_doc.html. r=birtles Automation also uses env vars to change the Stylo mode, so reading the pref is not enough. Change the test to `isStyledByServo` which covers all cases. MozReview-Commit-ID: KLh42b4roF4
dom/animation/test/mozilla/file_restyling_xhr_doc.html
--- a/dom/animation/test/mozilla/file_restyling_xhr_doc.html
+++ b/dom/animation/test/mozilla/file_restyling_xhr_doc.html
@@ -97,23 +97,17 @@ promise_test(t => {
     // Adopt node into XHR doc
     xhrdoc.body.appendChild(div);
     // We should skip applying animation styles to elements in documents
     // without a pres shell.
     //
     // The Gecko style backend, however, does not do this. Since we expect the
     // Gecko style backend to be obsolete in the near future, we only perform
     // this check when the Servo backend is in use.
-    let isServo = false;
-    try {
-      isServo = SpecialPowers.getBoolPref('layout.css.servo.enabled');
-    } catch(e) {
-      // getBoolPref throws if the pref does not exist, in which case isServo
-      // should remain false.
-    }
+    let isServo = SpecialPowers.DOMWindowUtils.isStyledByServo;
     if (isServo) {
       assert_equals(getComputedStyle(div).opacity, '1',
                     'Style should NOT be updated');
     }
   });
 }, 'Moving an element with a pending animation restyle to a document without'
    + ' a browsing context resets animation style');