blob: af7be998384e773d112e9492b5cd28c4417d0147 [file] [log] [blame]
// Copyright 2019 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.
(async function() {
await TestRunner.loadModule('axe_core_test_runner');
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
TestRunner.addResult('Performance panel loaded.');
const tabbedPane = UI.panels.timeline._flameChart._detailsView._tabbedPane;
tabbedPane.selectTab(Timeline.TimelineDetailsView.Tab.EventLog);
TestRunner.addResult('Loading a performance model.');
const view = tabbedPane.visibleView;
const model = PerformanceTestRunner.createPerformanceModelWithEvents([{}]);
view.setModel(model, PerformanceTestRunner.mainTrack());
view.updateContents(Timeline.TimelineSelection.fromRange(
model.timelineModel().minimumRecordTime(), model.timelineModel().maximumRecordTime()));
TestRunner.addResult('Running aXe on the event log pane.');
await AxeCoreTestRunner.runValidation(view.contentElement);
TestRunner.completeTest();
})();