Re-enable index-basics-workers test to see if still times
[chromium-blink-merge.git] / tools / cc-frame-viewer / src / inteactive_tests.html
blob819795c344b558942b24e81b2f2b71a68b3597f1
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
7 -->
8 <head i18n-values="dir:textdirection;">
9 <title>Interactive Timeline Tests</title>
10 <script src="base.js"></script>
11 </head>
12 <body>
13 <div class="timeline-test" src="../test_data/trivial_trace.json" create-detached=1>
14 </div>
16 <script>
17 function reqAsync(method, path, data, opt_response_cb, opt_err_cb) {
18 if (path[0] != '/')
19 throw new Error('Must start with /');
20 var req = new XMLHttpRequest();
21 req.open(method, BASE_URL + path, true);
22 req.addEventListener('load', function() {
23 if (req.status == 200) {
24 if (opt_response_cb)
25 opt_response_cb(JSON.parse(req.responseText));
26 return;
28 if (opt_err_cb)
29 opt_err_cb();
30 else
31 console.log('reqAsync ' + path, req);
32 });
33 req.addEventListener('error', function() {
34 if (opt_err_cb)
35 opt_err_cb();
36 else
37 console.log('reqAsync ' + path, req);
38 });
39 if (data)
40 req.send(JSON.stringify(data));
41 else
42 req.send(null);
44 </script>
46 </body>