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

Side by Side Diff: Tools/GardeningServer/ui/ct-tree-status-tests.html

Issue 408603002: Fix tests broken in r178299. (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 | « no previous file | 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-tree-status.html"> 7 <link rel="import" href="ct-tree-status.html">
8 8
9 <script> 9 <script>
10 (function () { 10 (function () {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 throttledtree.setAttribute("project", "throttled-tree-project"); 45 throttledtree.setAttribute("project", "throttled-tree-project");
46 var closedtree = document.createElement("ct-tree-status"); 46 var closedtree = document.createElement("ct-tree-status");
47 closedtree.setAttribute("project", "closed-tree-project"); 47 closedtree.setAttribute("project", "closed-tree-project");
48 simulator.runTest(function() { 48 simulator.runTest(function() {
49 var urlByName = treestatus.urlByName; 49 var urlByName = treestatus.urlByName;
50 treestatus.urlByName = function(name) { 50 treestatus.urlByName = function(name) {
51 return name + "-status.appspot.com/current?format=json"; 51 return name + "-status.appspot.com/current?format=json";
52 } 52 }
53 Promise.all([ 53 Promise.all([
54 opentree.update().then(function() { 54 opentree.update().then(function() {
55 equal(opentree.status, "Tree is open"); 55 equal(opentree.message, "Tree is open");
56 equal(opentree.$.content.style.backgroundColor, "rgb(72, 209, 204)"); 56 equal(opentree.status, "open");
57 }), 57 }),
58 throttledtree.update().then(function() { 58 throttledtree.update().then(function() {
59 equal(throttledtree.status, 59 equal(throttledtree.message,
60 "Tree is throttled just for fun by username@test.org"); 60 "Tree is throttled just for fun by username@test.org");
61 equal(throttledtree.$.content.style.backgroundColor, 61 equal(throttledtree.status, "throttled");
62 "rgb(240, 230, 140)");
63 }), 62 }),
64 closedtree.update().then(function() { 63 closedtree.update().then(function() {
65 equal(closedtree.status, 64 equal(closedtree.message,
66 "Tree is closed for maintenance by username@test.org"); 65 "Tree is closed for maintenance by username@test.org");
67 equal(closedtree.$.content.style.backgroundColor, 66 equal(closedtree.status, "closed");
68 "rgb(255, 99, 71)");
69 }) 67 })
70 ]).then(function() { 68 ]).then(function() {
71 start(); 69 start();
72 treestatus.urlByName = urlByName; 70 treestatus.urlByName = urlByName;
73 }); 71 });
74 }); 72 });
75 }); 73 });
76 74
77 })(); 75 })();
78 </script> 76 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698