addEventListener('loading-changed', function() {
            count++;
          });

          var request = ajax.generateRequest();

          server.respond();

          return request.completes.then(function() {
            return timePasses(1);
          }).then(function() {
            expect(count).to.be.equal(2);
          });
        });
      });

      suite('when there are multiple requests', function() {
        var requests;
        var echoAjax;
        var promiseAllComplete;

        setup(