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

Unified Diff: Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html

Issue 603293002: Showing only chromium status on chromium page, and both on blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switching to the fix proposed by Travis, adding tests" Created 6 years, 2 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
« no previous file with comments | « Tools/GardeningServer/ui/ct-unexpected-failures.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html
diff --git a/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html b/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html
index b35a8318157d9bd6291aac4126ed69b53031af01..198e20620923d4d9a913bc7a02dc61e34a71fdf2 100644
--- a/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html
+++ b/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html
@@ -65,6 +65,69 @@ describe('ct-unexpected-failures', function() {
done();
});
});
+
+ it('test showing only chromium tree status when chromium', function(done) {
+ var hasFailures = document.createElement('ct-unexpected-failures');
+ hasFailures.failures = new CTFailures(new CTCommitList(undefined, []));
ojan 2014/10/09 01:58:57 Why do we need the failures at all, including the
fgorski 2014/10/10 20:14:59 Good point, failures are only impacting visibility
+ hasFailures.failures.failures = {
+ chromium: [new CTStepFailure('step', 'reason', [])],
+ blink: [new CTStepFailure('step', 'reason', [])]
+ };
+ hasFailures.tree = 'chromium';
+
+ setTimeout(function() {
+ assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 1);
+
+ done();
+ });
+ });
+
+ it('test showing both chromium and blink tree status when blink (both fail)', function(done) {
+ var hasFailures = document.createElement('ct-unexpected-failures');
+ hasFailures.failures = new CTFailures(new CTCommitList(undefined, []));
+ hasFailures.failures.failures = {
+ chromium: [new CTStepFailure('step', 'reason', [])],
+ blink: [new CTStepFailure('step', 'reason', [])]
+ };
+ hasFailures.tree = 'blink';
+
+ setTimeout(function() {
+ assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 2);
+
+ done();
+ });
+ });
+
+ it('test showing both chromium and blink tree status when blink (blink fails)', function(done) {
+ var hasFailures = document.createElement('ct-unexpected-failures');
+ hasFailures.failures = new CTFailures(new CTCommitList(undefined, []));
+ hasFailures.failures.failures = {
+ blink: [new CTStepFailure('step', 'reason', [])]
+ };
+ hasFailures.tree = 'blink';
+
+ setTimeout(function() {
+ assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 2);
+
+ done();
+ });
+ });
+
+ it('test showing both chromium and blink tree status when blink (chromium fails)', function(done) {
+ var hasFailures = document.createElement('ct-unexpected-failures');
+ hasFailures.failures = new CTFailures(new CTCommitList(undefined, []));
+ hasFailures.failures.failures = {
+ chromium: [new CTStepFailure('step', 'reason', [])]
+ };
+ hasFailures.tree = 'blink';
+
+ setTimeout(function() {
+ assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 2);
+
+ done();
+ });
+ });
+
});
})();
« no previous file with comments | « Tools/GardeningServer/ui/ct-unexpected-failures.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698