function runTest(isAsync, testFunction, testArguments) {
  // Avoid eval() if at all possible, since it will not work on pages
  // that have enabled content-security-policy.
  var testBody = this[testFunction];  // global object -- not a method.
  var testName = testFunction;

  // Depending on how we were called, |this| might not resolve to the global
  // context.
  if (testName == 'RUN_TEST_F' && testBody === undefined)
    testBody = RUN_TEST_F;

  if (typeof testBody === 'undefined') {
    testBody = eval(testFunction);
    testName = testBody.toString();
  }
  if (testBody != RUN_TEST_F) {
    console.log('Running test ' + testName);
  }

  // Async allow expect errors, but not assert errors.
  var result = runTestFunction(testFunction, testBody, testArguments, isAsync);
  if (!isAsync || !result[0])
    testDone(result);
  return true;
}
/**
 * This is the starting point for tests run by WebUIBrowserTest.  If an error
 * occurs, it reports a failure and a message created by joining individual
 * error messages. This supports sync tests and async tests by calling
 * testDone() when |isAsync| is not true, relying on async tests to call
 * testDone() when they complete.
 * @param {boolean} isAsync When false, call testDone() with the test result
 *     otherwise only when assertions are caught.
 * @param {string} testFunction The function name to call.
 * @param {Array} testArguments The arguments to call |testFunction| with.
 * @return {boolean} true always to signal successful execution (but not
 *     necessarily successful results) of this test.
 * @see errors
 * @see runTestFunction
 */
This is the starting point for tests run by WebUIBrowserTest.  If an error
occurs, it reports a failure and a message created by joining individual
error messages. This supports sync tests and async tests by calling
testDone() when |isAsync| is not true, relying on async tests to call
testDone() when they complete.
@param {boolean} isAsync When false, call testDone() with the test result
otherwise only when assertions are caught.
@param {string} testFunction The function name to call.
@param {Array} testArguments The arguments to call |testFunction| with.
@return {boolean} true always to signal successful execution (but not
necessarily successful results) of this test.
@see errors
@see runTestFunction
This is the starting point for tests run by WebUIBrowserTest . If an error occurs it reports a failure and a message created by joining individual error messages . This supports sync tests and async tests by calling testDone () when |isAsync| is not true relying on async tests to call testDone () when they complete . @param { boolean } isAsync When false call testDone () with the test result otherwise only when assertions are caught . @param { string } testFunction The function name to call . @param { Array } testArguments The arguments to call |testFunction| with . @return { boolean } true always to signal successful execution ( but not necessarily successful results ) of this test . @see errors @see runTestFunction
function runTest(isAsync, testFunction, testArguments) {
  var testBody = this[testFunction];  
  var testName = testFunction;
  if (testName == 'RUN_TEST_F' && testBody === undefined)
    testBody = RUN_TEST_F;
  if (typeof testBody === 'undefined') {
    testBody = eval(testFunction);
    testName = testBody.toString();
  }
  if (testBody != RUN_TEST_F) {
    console.log('Running test ' + testName);
  }
  var result = runTestFunction(testFunction, testBody, testArguments, isAsync);
  if (!isAsync || !result[0])
    testDone(result);
  return true;
}
function runTest ( isAsync , testFunction , testArguments ) { var testBody = this [ testFunction ] ; var testName = testFunction ; if ( testName == 'RUN_TEST_F' && testBody === undefined ) testBody = RUN_TEST_F ; if ( typeof testBody === 'undefined' ) { testBody = eval ( testFunction ) ; testName = testBody . toString ( ) ; } if ( testBody != RUN_TEST_F ) { console . log ( 'Running test ' + testName ) ; } var result = runTestFunction ( testFunction , testBody , testArguments , isAsync ) ; if ( ! isAsync || ! result [ 0 ] ) testDone ( result ) ; return true ; }
This is the starting point for tests run by WebUIBrowserTest.
This is the starting point for tests run by WebUIBrowserTest .
// Avoid eval() if at all possible, since it will not work on pages // that have enabled content-security-policy. // global object -- not a method. // Depending on how we were called, |this| might not resolve to the global // context. // Async allow expect errors, but not assert errors.