diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 02:51:47 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-03 02:51:47 +0000 |
commit | d52947b2fdea247ca43a18fb6241f438bfd68765 (patch) | |
tree | dd437aa1165ada6138c82cd6fae97a778ab4ad5e /tools/gypv8sh.py | |
parent | 0411f907e5d33c4355f9e7906897556954def638 (diff) | |
download | chromium_src-d52947b2fdea247ca43a18fb6241f438bfd68765.zip chromium_src-d52947b2fdea247ca43a18fb6241f438bfd68765.tar.gz chromium_src-d52947b2fdea247ca43a18fb6241f438bfd68765.tar.bz2 |
Revert 108391 - Broke 'compile' on Mac clobber builder
Allow javascript unit tests using webui test_api framework.
I moved javascript2webui.js over to chrome/test/base/js2gtest.js and shared it
across webui and unit tests with an extra parameter for test type, which governs
the few differences, such as what to include/subclass from and the flavor of
gtest (TEST_F v. IN_PROC_BROWSER_TEST_F).
v8_unit_test implemented 2 main methods to make it work with the generated C++
- AddLibrary - loads the file in the test context
- RunJavascriptF - launches the runTest with the testFixture and testName,
coordinating with Error and ChromeSend to report results.
Helper functions:
- Error - watches for console.error, noting failure if seen.
- ChromeSend - pulls apart the result from the test_api's call to
chrome.send('testResult', [ok, msg])
R=arv@chromium.org
BUG=87820
TEST=unit_tests --gtest_filter=FrameworkUnitTest.*
Review URL: http://codereview.chromium.org/8418015
TBR=scr@chromium.org
Review URL: http://codereview.chromium.org/8440060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gypv8sh.py')
-rw-r--r-- | tools/gypv8sh.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/gypv8sh.py b/tools/gypv8sh.py index 7018db9..ca9c759 100644 --- a/tools/gypv8sh.py +++ b/tools/gypv8sh.py @@ -24,18 +24,18 @@ import shutil def main (): parser = optparse.OptionParser() parser.set_usage( - "%prog v8_shell mock.js test_api.js js2webui.js " - "testtype inputfile inputrelfile cxxoutfile jsoutfile") + "%prog v8_shell mock.js test_api.js js2webui.js inputfile inputrelfile " + "cxxoutfile jsoutfile") parser.add_option('-v', '--verbose', action='store_true') parser.add_option('-n', '--impotent', action='store_true', help="don't execute; just print (as if verbose)") (opts, args) = parser.parse_args() - if len(args) != 9: + if len(args) != 8: parser.error('all arguments are required.') - (v8_shell, mock_js, test_api, js2webui, test_type, - inputfile, inputrelfile, cxxoutfile, jsoutfile) = args - arguments = [js2webui, inputfile, inputrelfile, cxxoutfile, test_type] + (v8_shell, mock_js, test_api, js2webui, inputfile, inputrelfile, + cxxoutfile, jsoutfile) = args + arguments = [js2webui, inputfile, inputrelfile, cxxoutfile] cmd = [v8_shell, '-e', "arguments=" + json.dumps(arguments), mock_js, test_api, js2webui] if opts.verbose or opts.impotent: |