1 # Copyright 2014 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.
8 from ui import spy_project
9 from tvcm import generate
12 parser = optparse.OptionParser()
13 parser.add_option('--output-file', '-o')
14 options,args = parser.parse_args(args)
16 if options.output_file:
17 ofile = open(options.output_file, 'w')
21 if ofile != sys.stdout:
24 def GenerateHTML(ofile):
25 project = spy_project.SpyProject()
26 load_sequence = project.CalcLoadSequenceForModuleNames(
30 document.addEventListener('DOMContentLoaded', function() {
31 document.body.appendChild(new ui.SpyShell('ws://127.0.0.1:42424'));
35 bootstrap_script = generate.ExtraScript(text_content=bootstrap_js)
36 generate.GenerateStandaloneHTMLToFile(
39 extra_scripts=[bootstrap_script])