<!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> <div class="timeline-test" src="../test_data/trivial_trace.json"> </div> <div class="timeline-test" src="../test_data/simple_trace.json"> </div> <div class="timeline-test" src="../test_data/instance_counters.json"> </div> <div class="timeline-test" src="../test_data/tall_trace.json"> </div> <div class="timeline-test" src="../test_data/big_trace.json"> </div> <div class="timeline-test" src="../test_data/huge_trace.json"> </div> <div class="timeline-test" src="../test_data/main_thread_has_unclosed_slices.json"> </div> <div class="timeline-test" src="../test_data/async_begin_end.json"> </div> <script> base.require('timeline_view'); base.require('test_utils'); function load(parentEl) { var src = parentEl.getAttribute('src'); if (document.location.hash && document.location.hash.substring(1) != src) { parentEl.hidden = true; return; } parentEl.hidden = false; parentEl.textContent = ''; var titleEl = document.createElement('h3'); var linkEl = document.createElement('a'); linkEl.textContent = src; linkEl.href = '#' + src; titleEl.appendChild(linkEl); var containerEl = document.createElement('div'); containerEl.tabIndex = 0; containerEl.style.border = '1px solid red'; containerEl.style.display = '-webkit-box'; containerEl.style.maxHeight = '800px'; var timelineViewEl = document.createElement('div'); base.ui.decorate(timelineViewEl, tracing.TimelineView); timelineViewEl.focusElement = containerEl; parentEl.appendChild(titleEl); parentEl.appendChild(containerEl); // Creating attached vs detached stress tests the canvas- and viewport- // setup code. var create_detached = parentEl.getAttribute('create-attached') == 1; function createModel(data) { timelineViewEl.model = new tracing.TimelineModel(data); if (!create_detached) containerEl.appendChild(timelineViewEl); } if (create_detached) containerEl.appendChild(timelineViewEl); test_utils.getAsync(src, createModel); } function onLoad() { Array.prototype.forEach.call(document.querySelectorAll('.timeline-test'), load); } document.addEventListener('DOMContentLoaded', onLoad); window.addEventListener('hashchange', onLoad); </script> </body> </html>