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

Unified Diff: Tools/GardeningServer/ui/test/ct-last-updated-tests.html

Issue 453543002: Add last update time to Sheriff-O-Matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 4 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-last-updated-tests.html
diff --git a/Tools/GardeningServer/ui/test/ct-last-updated-tests.html b/Tools/GardeningServer/ui/test/ct-last-updated-tests.html
new file mode 100644
index 0000000000000000000000000000000000000000..b4aaec06dbdfbe6c569a87fe3679acd3f2623baa
--- /dev/null
+++ b/Tools/GardeningServer/ui/test/ct-last-updated-tests.html
@@ -0,0 +1,35 @@
+<!--
+Copyright 2014 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+
+<link rel="import" href="../ct-last-updated.html">
+
+<script>
+(function() {
+
+var expect = chai.expect;
+
+describe('ct-last-updated', function() {
+ var builder;
+
+ beforeEach(function(done) {
+ builder = document.createElement('ct-last-updated');
+ // Set the date to 5 minutes ago.
+ builder.date = new Date(Date.now() - (5 * 60 * 1000));
+ requestAnimationFrame(function() { done(); });
+ });
+
+ describe('default UI', function() {
+ it('should have correct text', function() {
+ var expected = 'Updated 5 min ago @ ' + builder.date.getHours() + ':' +
+ builder.date.getMinutes();
+ expect(builder.shadowRoot.innerHTML.trim()).to.equal(expected);
+ });
+ });
+});
+
+})()
+
+</script>
« 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