Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: tools/v8sh.py

Issue 7087014: Support automatic javascript test registry in gtest when creating WebUI tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: undid sorting of .gitignore Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« tools/gypv8sh.py ('K') | « tools/gypv8sh.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5 #
6 # This script prints out include dependencies in chrome. Since it ignores
7 # defines, it gives just a rough estimation of file size.
8 #
9 # Usage:
10 # in another js script, put the following first line:
11 # #!/usr/bin/env tools/v8sh.py
12 # --or--
13 # python tools/v8sh.py chrome/browser/ui/webui/javascript2webui.js
14 # WebUIBrowserTest chrome/test/data/webui/sample_downloads.js
15 import json
16 import sys
17 import tempfile
18 import os
19 import subprocess
20 arguments = "arguments=" + json.dumps(sys.argv[1:])
21 jsfilename = sys.argv[1]
22 tmpfile = tempfile.NamedTemporaryFile()
23 with open(jsfilename) as jsfile:
24 jsfile.readline()
25 for line in jsfile:
26 tmpfile.write(line)
27 tmpfile.flush()
28 v8_shell = os.path.join(
29 os.path.dirname(os.path.dirname(sys.argv[0])),'out/Debug/v8_shell')
Paweł Hajdan Jr. 2011/06/10 07:38:29 What with Release mode and non-Linux platforms?
Sheridan Rawlins 2011/06/11 18:07:19 Done. (Pass the <(PRODUCT_DIR) to the script).
30 cmd = (v8_shell, '-e', arguments, tmpfile.name);
31 subprocess.call(cmd);
OLDNEW
« tools/gypv8sh.py ('K') | « tools/gypv8sh.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698