Chromium Code Reviews| 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> |