| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | |
| 3 Use of this source code is governed by a BSD-style license that can be | |
| 4 found in the LICENSE file. | |
| 5 --> | |
| 6 | |
| 7 <link rel="import" href="ct-commit-data.html"> | |
| 8 | |
| 9 <script> | |
| 10 (function () { | |
| 11 | |
| 12 module("ct-commit-data"); | |
| 13 | |
| 14 asyncTest("basic", 2, function() { | |
| 15 // FIXME: ct-commit-data should be self-contained instead of depending on this
static function. | |
| 16 var oldCommitDataListForRevisionRange = model.commitDataListForRevisionRange; | |
| 17 var reset = function() { | |
| 18 model.commitDataListForRevisionRange = oldCommitDataListForRevisionRange; | |
| 19 } | |
| 20 | |
| 21 try { | |
| 22 model.commitDataListForRevisionRange = function(first, last) { return [first
+ ':' + last]; }; | |
| 23 | |
| 24 var commitData = document.createElement('ct-commit-data'); | |
| 25 | |
| 26 commitData.first = 1; | |
| 27 commitData.last = 2; | |
| 28 | |
| 29 commitData.async(function() { | |
| 30 reset(); | |
| 31 equal(commitData.data.length, 1); | |
| 32 equal(commitData.data[0], '1:2'); | |
| 33 start(); | |
| 34 }); | |
| 35 } catch(e) { | |
| 36 reset(); | |
| 37 } | |
| 38 | |
| 39 }); | |
| 40 | |
| 41 })() | |
| 42 </script> | |
| OLD | NEW |