Kicks off a mocha run, waiting for frameworks to load if necessary.

@param {!MultiReporter} reporter Where to send Mocha's events.
@param {function} done A callback fired, _no error is passed_.
function _runMocha(reporter, done, waited) {
    if (get('waitForFrameworks') && !waited) {
        var waitFor = (get('waitFor') || whenFrameworksReady).bind(window);
        waitFor(_runMocha.bind(null, reporter, done, true));
        return;
    }
    debug('_runMocha');
    var mocha = window.mocha;
    var Mocha = window.Mocha;
    mocha.reporter(reporter.childReporter(window.location));
    mocha.suite.title = reporter.suiteTitle(window.location);
    mocha.grep(GREP);
    // We can't use `mocha.run` because it bashes over grep, invert, and friends.
    // See https://github.com/visionmedia/mocha/blob/master/support/tail.js#L137
    var runner = Mocha.prototype.run.call(mocha, function (_error) {
        if (document.getElementById('mocha')) {
            Mocha.utils.highlightTags('code');
        }
        done(); // We ignore the Mocha failure count.
    });
    // Mocha's default `onerror` handling strips the stack (to support really old
    // browsers). We upgrade this to get better stacks for async errors.
    //
    // TODO(nevir): Can we expand support to other browsers?
    if (navigator.userAgent.match(/chrome/i)) {
        window.onerror = null;
        window.addEventListener('error', function (event) {
            if (!event.error)
                return;
            if (event.error.ignore)
                return;
            runner.uncaught(event.error);
        });
    }
}