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.
8 <head i18n-values=
"dir:textdirection;">
9 <title>Interactive Timeline Tests
</title>
10 <script src=
"base.js"></script>
13 <div class=
"timeline-test" src=
"../test_data/trivial_trace.json" create-detached=
1>
17 function reqAsync(method
, path
, data
, opt_response_cb
, opt_err_cb
) {
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) {
25 opt_response_cb(JSON
.parse(req
.responseText
));
31 console
.log('reqAsync ' + path
, req
);
33 req
.addEventListener('error', function() {
37 console
.log('reqAsync ' + path
, req
);
40 req
.send(JSON
.stringify(data
));