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

Unified Diff: tools/cc-frame-viewer/src/inteactive_tests.html

Issue 12225131: [cc] Initial checkin of cc-frame-viewer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/cc-frame-viewer/src/color_mappings.js ('k') | tools/cc-frame-viewer/src/lthi_view.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cc-frame-viewer/src/inteactive_tests.html
diff --git a/tools/cc-frame-viewer/src/inteactive_tests.html b/tools/cc-frame-viewer/src/inteactive_tests.html
new file mode 100644
index 0000000000000000000000000000000000000000..819795c344b558942b24e81b2f2b71a68b3597f1
--- /dev/null
+++ b/tools/cc-frame-viewer/src/inteactive_tests.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+Copyright (c) 2012 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.
+-->
+<head i18n-values="dir:textdirection;">
+<title>Interactive Timeline Tests</title>
+<script src="base.js"></script>
+</head>
+<body>
+ <div class="timeline-test" src="../test_data/trivial_trace.json" create-detached=1>
+ </div>
+
+ <script>
+ function reqAsync(method, path, data, opt_response_cb, opt_err_cb) {
+ if (path[0] != '/')
+ throw new Error('Must start with /');
+ var req = new XMLHttpRequest();
+ req.open(method, BASE_URL + path, true);
+ req.addEventListener('load', function() {
+ if (req.status == 200) {
+ if (opt_response_cb)
+ opt_response_cb(JSON.parse(req.responseText));
+ return;
+ }
+ if (opt_err_cb)
+ opt_err_cb();
+ else
+ console.log('reqAsync ' + path, req);
+ });
+ req.addEventListener('error', function() {
+ if (opt_err_cb)
+ opt_err_cb();
+ else
+ console.log('reqAsync ' + path, req);
+ });
+ if (data)
+ req.send(JSON.stringify(data));
+ else
+ req.send(null);
+ }
+ </script>
+
+</body>
« no previous file with comments | « tools/cc-frame-viewer/src/color_mappings.js ('k') | tools/cc-frame-viewer/src/lthi_view.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698