Bug 1465983 part 3 - Fix the use of Promise.then() in test_font_loading_api.html. r=orange
authorJonathan Watt <jwatt@jwatt.org>
Tue, 22 May 2018 19:30:35 +0100
changeset 421511 4825bdfd6927f0d46ba6df72373d0b5b0662e774
parent 421459 300f70a00d0be95050e62e3e757304bd1fceeb9e
child 421512 66a3146a7fce62c513aa0fec48a0a4b62a839881
push id34096
push usernbeleuzu@mozilla.com
push dateWed, 06 Jun 2018 09:37:23 +0000
treeherdermozilla-central@cec4a3cecc29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersorange
bugs1465983
milestone62.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 1465983 part 3 - Fix the use of Promise.then() in test_font_loading_api.html. r=orange
layout/style/test/test_font_loading_api.html
--- a/layout/style/test/test_font_loading_api.html
+++ b/layout/style/test/test_font_loading_api.html
@@ -223,18 +223,18 @@ function runTest() {
     is(Object.getPrototypeOf(FontFaceSetLoadEvent.prototype), Event.prototype, "FontFaceSetLoadEvent should inherit from Event (TEST 2)");
 
   }).then(function() {
 
     // (TEST 3) Test that document.fonts.ready is resolved with the
     // document.fonts FontFaceSet.
     var p = Promise.resolve();
     sourceDocuments.forEach(function({ doc, what }) {
-      p = p.then(doc.fonts.ready).then(function() {
-        return is_resolved_with(doc.fonts.ready, doc.fonts, "document.fonts.ready resolves with document.fonts", "(TEST 3) (" + what + ")");
+      p = p.then(_ => { return doc.fonts.ready }).then(function() {
+        return is_resolved_with(doc.fonts.ready, doc.fonts, "document.fonts.ready resolves with document.fonts.", "(TEST 3) (" + what + ")");
       });
     });
     return p;
 
   }).then(function() {
 
     // (TEST 4) Test that document.fonts in this test document starts out with no
     // FontFace objects in it.