Commit edd07fbe authored by ojan@chromium.org's avatar ojan@chromium.org

Fix private style in ct-commit-data.html.

Also, while at it, add a basic test to make sure this code executes
correctly.

NOTRY=true

Review URL: https://codereview.chromium.org/380983002

git-svn-id: svn://svn.chromium.org/blink/trunk@177804 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6e5eb659
...@@ -76,6 +76,7 @@ THE POSSIBILITY OF SUCH DAMAGE. ...@@ -76,6 +76,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
<link rel="import" href="polymer-load-warning.html"> <link rel="import" href="polymer-load-warning.html">
<link rel="import" href="ui/ct-builder-grid-tests.html"> <link rel="import" href="ui/ct-builder-grid-tests.html">
<link rel="import" href="ui/ct-builder-tests.html"> <link rel="import" href="ui/ct-builder-tests.html">
<link rel="import" href="ui/ct-commit-data-tests.html">
<link rel="import" href="ui/ct-commit-tests.html"> <link rel="import" href="ui/ct-commit-tests.html">
<link rel="import" href="ui/ct-failure-card-tests.html"> <link rel="import" href="ui/ct-failure-card-tests.html">
<link rel="import" href="ui/ct-failure-grouper-tests.html"> <link rel="import" href="ui/ct-failure-grouper-tests.html">
......
<!--
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-commit-data.html">
<script>
(function () {
module("ct-commit-data");
asyncTest("basic", 2, function() {
// FIXME: ct-commit-data should be self-contained instead of depending on this static function.
var oldCommitDataListForRevisionRange = model.commitDataListForRevisionRange;
var reset = function() {
model.commitDataListForRevisionRange = oldCommitDataListForRevisionRange;
}
try {
model.commitDataListForRevisionRange = function(first, last) { return [first + ':' + last]; };
var commitData = document.createElement('ct-commit-data');
commitData.first = 1;
commitData.last = 2;
commitData.async(function() {
reset();
equal(commitData.data.length, 1);
equal(commitData.data[0], '1:2');
start();
});
} catch(e) {
reset();
}
});
})()
</script>
...@@ -12,14 +12,14 @@ found in the LICENSE file. ...@@ -12,14 +12,14 @@ found in the LICENSE file.
last: 0, last: 0,
firstChanged: function() { firstChanged: function() {
this.update_(); this._update();
}, },
lastChanged: function() { lastChanged: function() {
this.update_(); this._update();
}, },
update_: function() { _update: function() {
this.data = model.commitDataListForRevisionRange(this.first, this.last); this.data = model.commitDataListForRevisionRange(this.first, this.last);
}, },
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment