Commit 11eea5bf authored by nduca@chromium.org's avatar nduca@chromium.org

This pulls in trace-viewer, which has switched to html imports

As such, update telemery to html imports as well.

TBR=dtu,dsinclair

Review URL: https://codereview.chromium.org/418883003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285874 0039d316-1c4b-4281-b951-d872f2087c98
parent 336460b5
......@@ -112,7 +112,7 @@ deps = {
Var("chromium_git") + "/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8",
"src/third_party/trace-viewer":
(Var("googlecode_url") % "trace-viewer") + "/trunk@1308",
(Var("googlecode_url") % "trace-viewer") + "/trunk@1412",
"src/third_party/WebKit":
Var("webkit_trunk") + "@" + Var("webkit_revision"),
......
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
<!DOCTYPE html>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/tvcm/ui.html">
<script>
'use strict';
tvcm.require('tvcm.ui');
tvcm.exportTo('telemetry.web_components', function() {
/**
* @constructor
......@@ -37,3 +39,4 @@ tvcm.exportTo('telemetry.web_components', function() {
ResultsViewer: ResultsViewer
};
});
</script>
<!DOCTYPE html>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/telemetry/web_components/results_viewer.html">
<script>
'use strict';
tvcm.unittest.testSuite(function() {
test('testBasic', function() {
var resultsViewer = new telemetry.web_components.ResultsViewer();
resultsViewer.dataToView = {hello: 'world', nice: ['to', 'see', 'you']};
this.addHTMLOutput(resultsViewer);
});
});
</script>
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
tvcm.require('telemetry.web_components.results_viewer');
tvcm.unittest.testSuite('telemetry.web_components.results_viewer_unittest',
function() {
test('testBasic', function() {
var resultsViewer = new telemetry.web_components.ResultsViewer();
resultsViewer.dataToView = {hello: 'world', nice: ['to', 'see', 'you']};
this.addHTMLOutput(resultsViewer);
});
});
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
<!DOCTYPE html>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/tvcm/ui.html">
<script>
'use strict';
tvcm.require('tvcm.ui');
tvcm.exportTo('telemetry.web_components', function() {
/**
* @constructor
......@@ -32,3 +34,4 @@ tvcm.exportTo('telemetry.web_components', function() {
SimpleViewer: SimpeViewer
};
});
</script>
......@@ -8,14 +8,33 @@ import os
from telemetry.core import util
from trace_viewer import trace_viewer_project
def _FindAllFilesRecursive(source_paths, pred):
all_filenames = set()
for source_path in source_paths:
for dirpath, _, filenames in os.walk(source_path):
for f in filenames:
if f.startswith('.'):
continue
x = os.path.abspath(os.path.join(dirpath, f))
if pred(x):
all_filenames.add(x)
return all_filenames
class WebComponentsProject(trace_viewer_project.TraceViewerProject):
telemetry_path = os.path.abspath(util.GetTelemetryDir())
d3_path = os.path.abspath(os.path.join(
telemetry_path,
'third_party', 'd3'))
def __init__(self, *args, **kwargs):
super(WebComponentsProject, self).__init__(*args, **kwargs)
exclude_paths = [os.path.join(self.telemetry_path, 'docs'),
os.path.join(self.telemetry_path, 'unittest_data'),
os.path.join(self.telemetry_path, 'support')]
excluded_html_files = _FindAllFilesRecursive(
exclude_paths,
lambda x: x.endswith('.html'))
self.non_module_html_files.extend(excluded_html_files)
self.non_module_html_files.appendRel(self.telemetry_path, 'results.html')
def __init__(self):
super(WebComponentsProject, self).__init__(
[self.telemetry_path, self.d3_path])
self.source_paths.append(self.telemetry_path)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment