blob: f91485683b1d10e3d420a1267081957a881d22fc [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright 2015 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.
-->
<link rel="import" href="/dashboard/elements/group-report-page.html">
<link rel="import" href="/dashboard/static/testing_common.html">
<link rel="import" href="/tracing/core/test_utils.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
var testOptions = {
tearDown: function() {
testing_common.clearXhrMock();
}
};
test('instantiation', function() {
var mockResponse = {
'alert_list': [
{
'key': '12345',
'group': null,
'start_revision': 55555,
'end_revision': 55558,
'date': '2016-02-27',
'master': 'Chromium',
'bot': 'win',
'testsuite': 'sunspider',
'test': 'Total',
'bug_id': null,
'dashboard_link': 'http://do/not/click/me',
'median_after_anomaly': 40,
'median_before_anomaly': 20,
'percent_changed': '50%',
'improvement': true,
'bisect_status': null,
'recovered': false
}
],
'owner_info': [{'email': 'foo@bar.org'}],
'subtests': {
'Chromium/win': {'sunspider': ['Total', '3d-cube']}
},
'revision_info': {
'r_chromium': {
'name': 'Chromium Git Hash',
'url': 'https://chromium.googlesource.com/+log/{{R1}}..{{R2}}'
}
},
'test_suites': {},
'login_url': 'http://do/not/click/me',
'is_internal_user': false,
'xsrf_token': '12345'
};
testing_common.addXhrMock('*', JSON.stringify(mockResponse));
var page = document.createElement('group-report-page');
this.addHTMLOutput(page);
}, testOptions);
});
</script>