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

Unified Diff: Tools/GardeningServer/ui/ct-revision-details-tests.html

Issue 410483002: Add the revision details widget to sheriff-o-matic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update to ToT, add Popup Menu and tests. 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
Index: Tools/GardeningServer/ui/ct-revision-details-tests.html
diff --git a/Tools/GardeningServer/ui/ct-revision-details-tests.html b/Tools/GardeningServer/ui/ct-revision-details-tests.html
new file mode 100644
index 0000000000000000000000000000000000000000..b3ed695ef87bf6351d3a9a7610160dcafb575bf2
--- /dev/null
+++ b/Tools/GardeningServer/ui/ct-revision-details-tests.html
@@ -0,0 +1,43 @@
+<!--
+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-revision-details.html">
+<link rel="import" href="../model/ct-builder-revisions-mock.html">
+
+<script>
+(function() {
+
+module("ct-revision-details");
+
+asyncTest("empty", 2, function() {
+ var revisionDetails = document.createElement('ct-revision-details');
+ requestAnimationFrame(function() {
+ equal(revisionDetails.shadowRoot.querySelector('#fullyProcessedRevision'), null);
ojan 2014/08/05 02:07:23 It's very mysterious to me that revisionDetails.$.
leviw_travelin_and_unemployed 2014/08/05 20:51:17 Beats me, but you will notice there are no other t
+ equal(revisionDetails.shadowRoot.querySelector('#trunkRevision'), null);
+ start();
+ });
+});
+
+asyncTest("basic", 2, function() {
+ var revisionDetails = document.createElement('ct-revision-details');
+
+ var builderRevisions = CTBuilderRevisionsMock();
+ var commitLog = CTCommitLogMock();
+ commitLog._findFirstAndLastRevisions('blink');
ojan 2014/08/05 02:07:23 Should CTCommitLogMock be the one doing this? Seem
leviw_travelin_and_unemployed 2014/08/05 20:51:17 Doing it in CTCommitLogMock breaks ct-commit-list:
+
+ revisionDetails.builderLatestRevisions = builderRevisions;
+ revisionDetails.tree = 'blink';
+ revisionDetails.revisionLog = commitLog;
+
+ requestAnimationFrame(function() {
+ equal(revisionDetails.shadowRoot.querySelector('#fullyProcessedRevision').innerText, '158543');
+ equal(revisionDetails.shadowRoot.querySelector('#trunkRevision').innerText, '158545');
+ start();
+ });
+});
+
+})()
+</script>

Powered by Google App Engine
This is Rietveld 408576698