Bug 1144450 - Part 1: Fix a typo in test_font_loading_api.html. r=jdaggett
authorCameron McCormack <cam@mcc.id.au>
Tue, 24 Mar 2015 19:34:32 +1100
changeset 265550 a106024f6b0da57d2e25a1b8b34a3ff17edddef3
parent 265549 6229a2b58212102344fc13881703d3cae17e9490
child 265551 f2c86fe2f8e92ef8cd19a0e224b259d0927785fd
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett
bugs1144450
milestone39.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 1144450 - Part 1: Fix a typo in test_font_loading_api.html. r=jdaggett
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
@@ -719,17 +719,17 @@ function runTest() {
     // with status "unloaded" is added to the FontFaceSet and load() is called
     // on it.
     var face;
     var awaitEvents = new Promise(function(aResolve, aReject) {
 
       var onloadingdoneTriggered = false, loadingdoneDispatched = false;
 
       function check() {
-        if (loadingdoneDispatched && loadingdoneDispatched) {
+        if (onloadingdoneTriggered && loadingdoneDispatched) {
           document.fonts.onloadingdone = null;
           document.fonts.removeEventListener("loadingdone", doneListener);
           aResolve();
         }
       }
 
       var doneListener = function(aEvent) {
         loadingdoneDispatched = true;
@@ -750,16 +750,17 @@ function runTest() {
           is(face.status, "loaded", "FontFace should have status \"loaded\" (TEST 31)");
           document.fonts.add(face);
           return awaitEvents;
         })
         .then(function() {
           document.fonts.clear();
           return document.fonts.ready;
         });
+
   }).then(function() {
 
     // (TEST 32) Test that pending restyles prevent document.fonts.status
     // from becoming loaded.
     var face = new FontFace("test", "url(neverending_font_load.sjs)");
     face.load();
     document.fonts.add(face);