function runBrowserTests(testPrefix, browser, testsFolder) {
  var testUrls = getTestUrls(testsFolder, testPrefix);
  if (testUrls.length == 0) {
    return Promise.reject(
        new Error('Did not find any tests for prefix ' + testPrefix));
  }

  log('Found', testUrls.length, 'tests. Running...');
  var driver = getWebDriver(browser);

  return new Promise(function(resolve, reject) {
    driver.getSession().then(function() {
      JsUnitTestRunner.runMany(browser, driver, testUrls).then(
          function(results) {
            var res = function() { resolve(results); };
            driver.quit().then(res, res);
          }, reject);
    }, reject);
  });
}
Runs tests in a browser context.
@param {?string|?Array<string>} testPrefix Only tests that match the prefix
    will be returned. If null, all tests will run.
@param {string} browser The browser to run the unit tests on.
@param {string} testsFolder The tests that contains all the test to be run.
@return {!IThenable}