Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Tools / GardeningServer / model / ct-commit-tests.html
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.html">
8
9 <script>
10 (function () {
11
12 module("ct-commit");
13
14 test("basic", 6, function() {
15   var message =
16       "This matches Gecko's behavior for these types of properties.\n" +
17       "\n" +
18       "BUG=17325\n" +
19       "R=jochen@chromium.org\n" +
20       "CC=abarth@chromium.org\n" +
21       "\n" +
22       "Review URL: https://chromiumcodereview.appspot.com/25022002\n" +
23       "\n" +
24       "git-svn-id: svn://svn.chromium.org/chrome/trunk@158545 bbb929c8-8fbe-4397-9dbb-9b2b20218538";
25   var url = "http://mockbase.com?{revision}";
26   var author = "mkwst@chromium.org";
27   var repository = 'blink';
28
29   var commit = CTCommit.create(author, message, url, repository);
30
31   equal(commit.author, author);
32   equal(commit.message, message);
33   equal(commit.revision, 158545);
34   equal(commit.summary, "This matches Gecko's behavior for these types of properties.");
35   equal(commit.url, url.assign({revision: "158545"}));
36   equal(commit.repository, repository);
37 });
38
39 test("blink", 2, function() {
40   var message =
41       "This matches Gecko's behavior for these types of properties.\n" +
42       "\n" +
43       "BUG=17325\n" +
44       "R=jochen@chromium.org\n" +
45       "CC=abarth@chromium.org\n" +
46       "\n" +
47       "Review URL: https://chromiumcodereview.appspot.com/25022002\n" +
48       "\n" +
49       "git-svn-id: svn://svn.chromium.org/blink/trunk@158545 bbb929c8-8fbe-4397-9dbb-9b2b20218538";
50   var url = "http://mockbase.com?{revision}";
51   var author = "mkwst@chromium.org";
52
53   var commit = CTCommit.create(author, message, url);
54
55   equal(commit.revision, 158545);
56   equal(commit.url, url.assign({revision: "158545"}));
57 });
58
59 test("createIncomplete", 3, function() {
60   var url = "http://mockbase.com?{revision}";
61   var repository = 'blink';
62   var revison = 158545;
63   var commit = CTCommit.createIncomplete(url, revison, repository);
64
65   equal(commit.revision, 158545);
66   equal(commit.url, url.assign({revision: "158545"}));
67   equal(commit.repository, repository);
68 });
69
70 })();
71 </script>