| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | |
| 3 Use of this source code is governed by a BSD-style license that can be | |
| 4 found in the LICENSE file. | |
| 5 --> | |
| 6 | |
| 7 <link rel="import" href="../ct-builder-grid.html"> | |
| 8 | |
| 9 <link rel="import" href="../ct-builder.html"> | |
| 10 <link rel="import" href="../../model/ct-builder-list.html"> | |
| 11 <link rel="import" href="../../model/ct-step-failure.html"> | |
| 12 | |
| 13 <script> | |
| 14 (function () { | |
| 15 | |
| 16 var assert = chai.assert; | |
| 17 | |
| 18 var kExampleFailures = [ | |
| 19 new CTStepFailure('layout_tests', "plugins/gesture-events-scrolled.html", | |
| 20 { | |
| 21 "WebKit Win7 (dbg)": { | |
| 22 "actual": "CRASH", | |
| 23 "masterUrl": "https://master-one", | |
| 24 "failingBuildCount": 2, | |
| 25 }, | |
| 26 "WebKit Mac10.6 (dbg)": { | |
| 27 "actual": "CRASH", | |
| 28 "masterUrl": "https://master-one", | |
| 29 "failingBuildCount": 1, | |
| 30 }, | |
| 31 "WebKit Mac10.7": { | |
| 32 "actual": "TEXT", | |
| 33 "masterUrl": "https://master-one", | |
| 34 "failingBuildCount": 1, | |
| 35 } | |
| 36 }, 177164, 177165), | |
| 37 new CTStepFailure('layout_tests', "plugins/transformed-events.html", | |
| 38 { | |
| 39 "WebKit Win7 (dbg)": { | |
| 40 "actual": "TEXT", | |
| 41 "masterUrl": "https://master-one", | |
| 42 "failingBuildCount": 2, | |
| 43 }, | |
| 44 "WebKit Mac10.7": { | |
| 45 "actual": "CRASH", | |
| 46 "masterUrl": "https://master-two", | |
| 47 "failingBuildCount": 1, | |
| 48 }, | |
| 49 }, 177164, 177165 | |
| 50 ) | |
| 51 ]; | |
| 52 | |
| 53 var kExampleBuilderLatestRevisions = { | |
| 54 'WebKit Mac10.7': { | |
| 55 blink: 177164, | |
| 56 }, | |
| 57 'WebKit Mac10.6 (dbg)': { | |
| 58 blink: 177166, | |
| 59 }, | |
| 60 'WebKit Win7 (dbg)': { | |
| 61 blink: 177166, | |
| 62 }, | |
| 63 }; | |
| 64 | |
| 65 describe('ct-builder-grid', function() { | |
| 66 var grid; | |
| 67 | |
| 68 beforeEach(function(done) { | |
| 69 grid = document.createElement('ct-builder-grid'); | |
| 70 grid.builderList = new CTBuilderList(kExampleFailures); | |
| 71 | |
| 72 setTimeout(done); | |
| 73 }); | |
| 74 | |
| 75 describe('builder grid UI', function() { | |
| 76 it('should show all failing builders', function() { | |
| 77 var builders = grid.shadowRoot.querySelectorAll('ct-builder'); | |
| 78 assert.lengthOf(builders, 4); | |
| 79 assert.deepEqual(builders[0].builder, new CTBuilder( | |
| 80 'https://master-one', 'WebKit Mac10.6 (dbg)', 1)); | |
| 81 assert.deepEqual(builders[1].builder, new CTBuilder( | |
| 82 'https://master-one', 'WebKit Mac10.7', 1)); | |
| 83 assert.deepEqual(builders[2].builder, new CTBuilder( | |
| 84 'https://master-two', 'WebKit Mac10.7', 1)); | |
| 85 assert.deepEqual(builders[3].builder, new CTBuilder( | |
| 86 'https://master-one', 'WebKit Win7 (dbg)', 2)); | |
| 87 }); | |
| 88 }); | |
| 89 }); | |
| 90 | |
| 91 })() | |
| 92 </script> | |
| OLD | NEW |