1 <!DOCTYPE html> 2 <!-- 3 Copyright 2015 The Chromium Authors. All rights reserved. 4 Use of this source code is governed by a BSD-style license that can be 5 found in the LICENSE file. 6 --> 7 8 <link rel="import" href="/dashboard/elements/group-report-page.html"> 9 <link rel="import" href="/dashboard/static/testing_common.html"> 10 11 <link rel="import" href="/tracing/core/test_utils.html"> 12 13 <script> 14 'use strict'; 15 16 tr.b.unittest.testSuite(function() { 17 18 var testOptions = { 19 tearDown: function() { 20 testing_common.clearXhrMock(); 21 } 22 }; 23 24 test('instantiation', function() { 25 var mockResponse = { 26 'alert_list': [ 27 { 28 'key': '12345', 29 'group': null, 30 'start_revision': 55555, 31 'end_revision': 55558, 32 'date': '2016-02-27', 33 'master': 'Chromium', 34 'bot': 'win', 35 'testsuite': 'sunspider', 36 'test': 'Total', 37 'bug_id': null, 38 'dashboard_link': 'http://do/not/click/me', 39 'median_after_anomaly': 40, 40 'median_before_anomaly': 20, 41 'percent_changed': '50%', 42 'improvement': true, 43 'bisect_status': null, 44 'recovered': false 45 } 46 ], 47 'owner_info': [{'email': 'foo (a] bar.org'}], 48 'subtests': { 49 'Chromium/win': {'sunspider': ['Total', '3d-cube']} 50 }, 51 'revision_info': { 52 'r_chromium': { 53 'name': 'Chromium Git Hash', 54 'url': 'https://chromium.googlesource.com/+log/{{R1}}..{{R2}}' 55 } 56 }, 57 'test_suites': {}, 58 'login_url': 'http://do/not/click/me', 59 'is_internal_user': false, 60 'xsrf_token': '12345' 61 }; 62 testing_common.addXhrMock('*', JSON.stringify(mockResponse)); 63 var page = document.createElement('group-report-page'); 64 this.addHTMLOutput(page); 65 }, testOptions); 66 67 }); 68 </script> 69