1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
9 function testFailsAssert() {
11 chrome.send('testContinues');
18 function testFailsExpect() {
20 chrome.send('testContinues');
25 * Passes and sends testDone message for browser_test to call
28 function testPasses() {
30 chrome.send('testContinues');
34 function testAsyncDoneFailFirstSyncPass() {
36 chrome.send('testContinues');
40 * Wraps the function represented by |name| similar to the way net_internals
42 * @param {string} name The name of the function to run.
44 function runAsync(name) {
45 // Strip |name| from arguments.
46 var testArguments = Array.prototype.slice.call(arguments, 1);
48 // call async function.
49 var result = runTestFunction(name, this[name], testArguments);
51 // Pass on success; bail on errors.
53 chrome.send('testPasses');
55 chrome.send('testFails');
61 * Sends a message to handler to start |testName| and returns.
62 * @param {string} testName The name of the test to run.
64 function startAsyncTest(testName) {
65 chrome.send('startAsyncTest', [testName]);