Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: Tools/GardeningServer/ui/ct-builder-grid-tests.html

Issue 406523004: Sheriff-o-matic: Move BUILDING builder row to end (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Tools/GardeningServer/ui/ct-builder-grid.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved. 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 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 -->
6 6
7 <link rel="import" href="ct-builder-grid.html"> 7 <link rel="import" href="ct-builder-grid.html">
8 8
9 <script> 9 <script>
10 (function () { 10 (function () {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 "has_stderr": true, 51 "has_stderr": true,
52 "time": 3.2 52 "time": 3.2
53 }, 53 },
54 }, 54 },
55 "oldestFailingRevision": 177164, 55 "oldestFailingRevision": 177164,
56 "newestPassingRevision": 177165 56 "newestPassingRevision": 177165
57 }]; 57 }];
58 58
59 module("ct-builder-grid"); 59 module("ct-builder-grid");
60 60
61 asyncTest("basic", 7, function() { 61 asyncTest("basic", 11, function() {
62 var grid = document.createElement('ct-builder-grid'); 62 var oldBuildersInFlightForRevision = model.buildersInFlightForRevision;
63 grid.failures = kExampleFailures; 63 var reset = function() {
64 model.buildersInFlightForRevision = oldBuildersInFlightForRevision;
65 }
64 66
65 Platform.endOfMicrotask(function() { 67 try {
66 var rows = grid.shadowRoot.querySelectorAll('tbody tr'); 68 model.buildersInFlightForRevision = function(revision) {
67 equal(rows.length, 2); 69 return {'WebKit Mac10.7': {}};
70 };
68 71
69 var row1 = grid.shadowRoot.querySelector('tbody td.CRASH').parentNode; 72 var grid = document.createElement('ct-builder-grid');
70 equal(row1.children.length, 3); 73 grid.failures = kExampleFailures;
71 equal(row1.children[1].querySelectorAll('ct-builder').length, 1); 74 requestAnimationFrame(function() {
72 equal(row1.children[1].querySelectorAll('ct-builder')[0].builderName, 'WebKi t Mac10.7'); 75 reset();
76 var rows = grid.shadowRoot.querySelectorAll('tbody tr');
77 equal(rows.length, 3);
73 78
74 equal(row1.children[2].querySelectorAll('ct-builder').length, 2); 79 var row1 = grid.shadowRoot.querySelector('tbody td.CRASH').parentNode;
75 equal(row1.children[2].querySelectorAll('ct-builder')[0].builderName, 'WebKi t Mac10.6 (dbg)'); 80 equal(row1.children.length, 3);
76 equal(row1.children[2].querySelectorAll('ct-builder')[1].builderName, 'WebKi t Win7 (dbg)'); 81 equal(row1.children[1].querySelectorAll('ct-builder').length, 1);
82 equal(row1.children[1].querySelectorAll('ct-builder')[0].builderName, 'Web Kit Mac10.7');
77 83
78 var row2 = grid.shadowRoot.querySelector('tbody td.TEXT').parentNode; 84 equal(row1.children[2].querySelectorAll('ct-builder').length, 2);
79 equal(row2.children.length, 3); 85 equal(row1.children[2].querySelectorAll('ct-builder')[0].builderName, 'Web Kit Mac10.6 (dbg)');
80 equal(row2.children[1].querySelectorAll('ct-builder').length, 1); 86 equal(row1.children[2].querySelectorAll('ct-builder')[1].builderName, 'WebK it Win7 (dbg)');
81 equal(row2.children[2].querySelectorAll('ct-builder').length, 1); 87
82 start(); 88 var row2 = grid.shadowRoot.querySelector('tbody td.TEXT').parentNode;
83 }); 89 equal(row2.children.length, 3);
90 equal(row2.children[1].querySelectorAll('ct-builder').length, 1);
91 equal(row2.children[2].querySelectorAll('ct-builder').length, 1);
92
93 notEqual(rows[2].children[0].className.indexOf('BUILDING'), -1);
94 start();
95 });
96 } catch(e) {
97 reset();
98 }
84 }); 99 });
85 100
86 })() 101 })()
87 </script> 102 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-builder-grid.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698