| 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-results-panel.html"> | |
| 8 | |
| 9 <link rel="import" href="../model/ct-failure.html"> | |
| 10 | |
| 11 <script> | |
| 12 (function () { | |
| 13 | |
| 14 var kExampleFailures = [ | |
| 15 new CTFailure("testName", "plugins/gesture-events-scrolled.html", | |
| 16 { | |
| 17 "WebKit Win7 (dbg)": { | |
| 18 "expected": "PASS", | |
| 19 "is_unexpected": true, | |
| 20 "actual": "CRASH", | |
| 21 "time": 0.9 | |
| 22 }, | |
| 23 "WebKit Mac10.6 (dbg)": { | |
| 24 "expected": "PASS", | |
| 25 "is_unexpected": true, | |
| 26 "actual": "CRASH", | |
| 27 "has_stderr": true, | |
| 28 "time": 1.8 | |
| 29 }, | |
| 30 "WebKit Mac10.7 (dbg)": { | |
| 31 "expected": "PASS", | |
| 32 "is_unexpected": true, | |
| 33 "actual": "CRASH", | |
| 34 "has_stderr": true, | |
| 35 "time": 3.2 | |
| 36 } | |
| 37 }, | |
| 38 177164, 177165 | |
| 39 ), | |
| 40 new CTFailure("testName", "plugins/transformed-events.html", | |
| 41 { | |
| 42 "WebKit Win7 (dbg)": { | |
| 43 "expected": "PASS", | |
| 44 "is_unexpected": true, | |
| 45 "actual": "CRASH", | |
| 46 "time": 0.6 | |
| 47 }, | |
| 48 "WebKit Mac10.6 (dbg)": { | |
| 49 "expected": "PASS", | |
| 50 "is_unexpected": true, | |
| 51 "actual": "CRASH", | |
| 52 "has_stderr": true, | |
| 53 "time": 1.4 | |
| 54 }, | |
| 55 "WebKit Mac10.7 (dbg)": { | |
| 56 "expected": "PASS", | |
| 57 "is_unexpected": true, | |
| 58 "actual": "CRASH", | |
| 59 "has_stderr": true, | |
| 60 "time": 3 | |
| 61 } | |
| 62 }, | |
| 63 177164, 177165 | |
| 64 ), | |
| 65 new CTFailure("testName", "plugins/gesture-events.html", | |
| 66 { | |
| 67 "WebKit Win7 (dbg)": { | |
| 68 "expected": "PASS", | |
| 69 "is_unexpected": true, | |
| 70 "actual": "CRASH", | |
| 71 "time": 1.7 | |
| 72 }, | |
| 73 "WebKit Mac10.6 (dbg)": { | |
| 74 "expected": "PASS", | |
| 75 "is_unexpected": true, | |
| 76 "actual": "CRASH", | |
| 77 "has_stderr": true, | |
| 78 "time": 2.5 | |
| 79 }, | |
| 80 "WebKit Mac10.7 (dbg)": { | |
| 81 "expected": "PASS", | |
| 82 "is_unexpected": true, | |
| 83 "actual": "CRASH", | |
| 84 "has_stderr": true, | |
| 85 "time": 3.4 | |
| 86 } | |
| 87 }, | |
| 88 177164, 177165 | |
| 89 ), | |
| 90 ]; | |
| 91 | |
| 92 module("ct-results-panel"); | |
| 93 | |
| 94 asyncTest("empty", 1, function() { | |
| 95 var panel = document.createElement('ct-results-panel'); | |
| 96 | |
| 97 requestAnimationFrame(function() { | |
| 98 var message = panel.shadowRoot.querySelector('.message'); | |
| 99 equal(message.textContent, 'No results to display.'); | |
| 100 | |
| 101 start(); | |
| 102 }); | |
| 103 }); | |
| 104 | |
| 105 asyncTest("basic", 8, function() { | |
| 106 var panel = document.createElement('ct-results-panel'); | |
| 107 | |
| 108 panel.failures = kExampleFailures; | |
| 109 | |
| 110 requestAnimationFrame(function() { | |
| 111 var items = panel.shadowRoot.querySelectorAll('paper-item'); | |
| 112 equal(items.length, 3); | |
| 113 equal(items[0].label, 'plugins/gesture-events-scrolled.html'); | |
| 114 equal(items[1].label, 'plugins/transformed-events.html'); | |
| 115 equal(items[2].label, 'plugins/gesture-events.html'); | |
| 116 | |
| 117 var results = panel.shadowRoot.querySelectorAll('ct-results-by-builder'); | |
| 118 equal(results.length, 1); | |
| 119 equal(results[0].failure, kExampleFailures[0]); | |
| 120 | |
| 121 panel.shadowRoot.querySelector('core-menu').selected = 2; | |
| 122 | |
| 123 requestAnimationFrame(function() { | |
| 124 var results = panel.shadowRoot.querySelectorAll('ct-results-by-builder'); | |
| 125 equal(results.length, 1); | |
| 126 equal(results[0].failure, kExampleFailures[2]); | |
| 127 | |
| 128 start(); | |
| 129 }); | |
| 130 }); | |
| 131 }); | |
| 132 | |
| 133 asyncTest("whole step failed", 4, function() { | |
| 134 var panel = document.createElement('ct-results-panel'); | |
| 135 | |
| 136 var failure = { | |
| 137 testName: null, | |
| 138 step: 'foo-step', | |
| 139 resultNodesByBuilder: { | |
| 140 'WebKit Win7 (dbg)': { | |
| 141 actual: 'UNKNOWN', | |
| 142 }, | |
| 143 }, | |
| 144 oldestFailingRevision: 123, | |
| 145 newestPassingRevision: 124, | |
| 146 }; | |
| 147 | |
| 148 panel.failures = [failure]; | |
| 149 | |
| 150 requestAnimationFrame(function() { | |
| 151 var items = panel.shadowRoot.querySelectorAll('paper-item'); | |
| 152 equal(items.length, 0); | |
| 153 | |
| 154 var results = panel.shadowRoot.querySelectorAll('ct-results-by-builder'); | |
| 155 equal(results.length, 1); | |
| 156 equal(results[0].failure, failure); | |
| 157 | |
| 158 equal(panel.shadowRoot.querySelectorAll('ct-embedded-flakiness-dashboard').l
ength, 0); | |
| 159 | |
| 160 start(); | |
| 161 }); | |
| 162 }); | |
| 163 | |
| 164 })() | |
| 165 </script> | |
| OLD | NEW |