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

Unified Diff: Tools/GardeningServer/scripts/ui/notifications_unittests.js

Issue 336033002: Cleanup some garden-o-matic cruft and dead code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/scripts/ui/notifications_unittests.js
diff --git a/Tools/GardeningServer/scripts/ui/notifications_unittests.js b/Tools/GardeningServer/scripts/ui/notifications_unittests.js
index faaf35c1512ffdd4184f938ba1485b1cefa852d5..491968bd1107a5ff93de6a51167b7bcc5447317d 100644
--- a/Tools/GardeningServer/scripts/ui/notifications_unittests.js
+++ b/Tools/GardeningServer/scripts/ui/notifications_unittests.js
@@ -27,46 +27,28 @@
module('ui.notifications');
-test('Notification', 5, function() {
+test('Notification', 3, function() {
var notification = new ui.notifications.Notification();
equal(notification.tagName, 'LI');
equal(notification.innerHTML, '<div class="how"></div><div class="what"></div>');
- equal(notification.index(), 0);
- notification.setIndex(1);
- equal(notification.index(), 1);
// FIXME: Really need to figure out how to mock/test animated removal.
ok(notification.dismiss);
});
-test('Stream', 11, function() {
+test('Stream', 7, function() {
var stream = new ui.notifications.Stream();
equal(stream.tagName, 'OL');
equal(stream.className, 'notifications');
equal(stream.childElementCount, 0);
- var notification;
-
- notification = new ui.notifications.Info('-o-matic');
- notification.setIndex(2);
+ var notification = new ui.notifications.Info('garden-o-matic is ');
stream.add(notification);
equal(stream.childElementCount, 1);
- equal(stream.textContent, '-o-matic');
-
- notification = new ui.notifications.Info('garden');
- notification.setIndex(3);
- stream.add(notification);
- equal(stream.childElementCount, 2);
- equal(stream.textContent, 'garden-o-matic');
-
- notification = new ui.notifications.Info(' is ');
- notification.setIndex(1);
- stream.add(notification);
- equal(stream.childElementCount, 3);
equal(stream.textContent, 'garden-o-matic is ');
notification = new ui.notifications.Info('awesome!');
stream.add(notification);
- equal(stream.childElementCount, 4);
+ equal(stream.childElementCount, 2);
equal(stream.textContent, 'garden-o-matic is awesome!');
});
@@ -101,7 +83,6 @@ test('FailingTestsSummary', 12, function() {
equal(testFailures.tagName, 'LI');
equal(testFailures.innerHTML,
'<div class="how">' +
- '<time class="relative"></time>' +
'<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody><tr class="BUILDING" style="display: none;"><td><span>BUILDING</span></td><td></td><td></td></tr></tbody>' +
@@ -118,10 +99,8 @@ test('FailingTestsSummary', 12, function() {
'<ul class="causes"></ul>' +
'</div>');
testFailures.addFailureAnalysis({testName: 'test', resultNodesByBuilder: {}});
- equal(testFailures.index(), 0);
equal(testFailures.innerHTML,
'<div class="how">' +
- '<time class="relative"></time>' +
'<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody><tr class="BUILDING" style="display: none;"><td><span>BUILDING</span></td><td></td><td></td></tr></tbody>' +
@@ -144,7 +123,6 @@ test('FailingTestsSummary', 12, function() {
testFailures.addFailureAnalysis({testName: 'test'});
equal(testFailures.innerHTML,
'<div class="how">' +
- '<time class="relative"></time>' +
'<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody><tr class="BUILDING" style="display: none;"><td><span>BUILDING</span></td><td></td><td></td></tr></tbody>' +
@@ -166,10 +144,8 @@ test('FailingTestsSummary', 12, function() {
var time = new Date();
time.setMinutes(time.getMinutes() - 10);
testFailures.addCommitData({revision: 1, time: time, title: "title", author: "author", reviewer: "reviewer"});
- equal(testFailures.index(), time.getTime());
equal(testFailures.innerHTML,
'<div class="how">' +
- '<time class="relative">10 minutes ago</time>' +
'<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody><tr class="BUILDING" style="display: none;"><td><span>BUILDING</span></td><td></td><td></td></tr></tbody>' +
@@ -202,7 +178,6 @@ test('FailingTestsSummary', 12, function() {
testFailures.addFailureAnalysis({testName: 'foo', resultNodesByBuilder: {'WebKit Linux (dbg)': { actual: 'TEXT'}}});
equal(testFailures.innerHTML,
'<div class="how">' +
- '<time class="relative">10 minutes ago</time>' +
'<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody>' +
@@ -243,7 +218,6 @@ test('FailingTestsSummary', 12, function() {
testFailures.updateBuilderResults({'WebKit Mac10.6': { actual: 'BUILDING'}});
equal(testFailures.innerHTML,
'<div class="how">' +
- '<time class="relative">10 minutes ago</time>' +
'<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody>' +
@@ -295,7 +269,6 @@ test('FailingTestsSummary (grouping)', 1, function() {
testFailures.addFailureAnalysis({testName: 'path/another/test.html', resultNodesByBuilder: {}});
equal(testFailures.innerHTML,
'<div class="how">' +
- '<time class="relative"></time>' +
'<table class="failures">' +
'<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
'<tbody><tr class="BUILDING" style="display: none;"><td><span>BUILDING</span></td><td></td><td></td></tr></tbody>' +
@@ -321,7 +294,6 @@ test('BuildersFailing', 1, function() {
builderFailing.setFailingBuilders({'WebKit Linux': ['compile'], 'WebKit Win7': ['webkit_tests', 'update']});
equal(builderFailing.innerHTML,
'<div class="how">' +
- '<time class="relative"></time>' +
'</div>' +
'<div class="what">' +
'<div class="problem">Disasterifying:' +

Powered by Google App Engine
This is Rietveld 408576698