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

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

Issue 403723005: Only show tree status if the tree isn't open. (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 side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/ui/ct-tree-status-tests.html
diff --git a/Tools/GardeningServer/ui/ct-tree-status-tests.html b/Tools/GardeningServer/ui/ct-tree-status-tests.html
index cdac1562d366954ee16c13c2f5bf0cd9b90c4ae5..817e86cfa2451419e28b02a71c1653c2c5b18d63 100644
--- a/Tools/GardeningServer/ui/ct-tree-status-tests.html
+++ b/Tools/GardeningServer/ui/ct-tree-status-tests.html
@@ -29,7 +29,7 @@ closedTreeJson = {
"can_commit_freely": false
}
-asyncTest("basic", 7, function() {
+asyncTest("basic", 9, function() {
var simulator = new NetworkSimulator();
simulator.json = function(url) {
if (url.indexOf('closed') != -1)
@@ -39,12 +39,14 @@ asyncTest("basic", 7, function() {
else
return Promise.resolve(openTreeJson);
};
+
var opentree = document.createElement("ct-tree-status");
- opentree.setAttribute("project", "open-tree-project");
+ opentree.project = "open-tree-project";
var throttledtree = document.createElement("ct-tree-status");
- throttledtree.setAttribute("project", "throttled-tree-project");
+ throttledtree.project = "throttled-tree-project";
var closedtree = document.createElement("ct-tree-status");
- closedtree.setAttribute("project", "closed-tree-project");
+ closedtree.project = "closed-tree-project";
+
simulator.runTest(function() {
var urlByName = treestatus.urlByName;
treestatus.urlByName = function(name) {
@@ -52,7 +54,6 @@ asyncTest("basic", 7, function() {
}
Promise.all([
opentree.update().then(function() {
- equal(opentree.message, "Tree is open");
equal(opentree.status, "open");
}),
throttledtree.update().then(function() {
@@ -66,8 +67,13 @@ asyncTest("basic", 7, function() {
equal(closedtree.status, "closed");
})
]).then(function() {
- start();
- treestatus.urlByName = urlByName;
+ requestAnimationFrame(function() {
+ ok(!opentree.shadowRoot.textContent.has("open-tree-project"));
+ ok(throttledtree.shadowRoot.textContent.has("throttled-tree-project"));
+ ok(closedtree.shadowRoot.textContent.has("closed-tree-project"));
+ start();
+ treestatus.urlByName = urlByName;
+ });
});
});
});
« Tools/GardeningServer/ui/ct-tree-status.html ('K') | « Tools/GardeningServer/ui/ct-tree-status.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698