browser.js
function getTitles(runnable) {
    var titles = [];
    while (runnable && !runnable.root && runnable.title) {
        titles.unshift(runnable.title);
        runnable = runnable.parent;
    }
    return titles;
}
function getTitles(runnable) {
    var titles = [];
    while (runnable && !runnable.root && runnable.title) {
        titles.unshift(runnable.title);
        runnable = runnable.parent;
    }
    return titles;
}
Misc Utility 
@param {!Mocha.Runnable} runnable The test or suite to extract titles from.
@return {!Array.<string>} The titles of the runnable and its parents.