1c6544109b183520a2b13bd8bb9dac176f71e041
[WebKit-https.git] / Tools / BuildSlaveSupport / build.webkit.org-config / public_html / dashboard / Scripts / tests / MockTrac.js
1 /*
2  * Copyright (C) 2016 Apple, Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 MockTrac = function()
27 {
28     Trac.call(this, "https://trac.webkit.org/");
29     this.recordedCommits = [
30         {
31             "revisionNumber": 33018,
32             "link": "http://trac.webkit.org/repository/changeset/77018/safari",
33             "title": {},
34             "author": "John",
35             "date": "2015-11-15T17:05:44.000Z",
36             "description": "description",
37             "containsBranchLocation": true,
38             "branch": "trunk"
39         },
40         {
41             "revisionNumber": 33019,
42             "link": "http://trac.webkit.org/repository/changeset/77019/safari",
43             "title": {},
44             "author": "Paul",
45             "date": "2015-11-16T01:18:23.000Z",
46             "description": "description",
47             "containsBranchLocation": true,
48             "branch": "trunk"
49         },
50         {
51             "revisionNumber": 33020,
52             "link": "http://trac.webkit.org/repository/changeset/77020/safari",
53             "title": {},
54             "author": "George",
55             "date": "2015-11-16T01:19:27.000Z",
56             "description": "description",
57             "containsBranchLocation": true,
58             "branch": "trunk"
59         },
60         {
61             "revisionNumber": 33021,
62             "link": "http://trac.webkit.org/repository/changeset/77021/safari",
63             "title": {},
64             "author": "Ringo",
65             "date": "2015-11-16T01:20:58.000Z",
66             "description": "description",
67             "containsBranchLocation": true,
68             "branch": "someOtherBranch"
69         },
70         {
71             "revisionNumber": 33022,
72             "link": "http://trac.webkit.org/repository/changeset/77022/safari",
73             "title": {},
74             "author": "Bob",
75             "date": "2015-11-16T01:22:01.000Z",
76             "description": "description",
77             "containsBranchLocation": true,
78             "branch": "trunk"
79         }
80     ];
81 };
82
83 BaseObject.addConstructorFunctions(MockTrac);
84
85 MockTrac.prototype = {
86     constructor: MockTrac,
87     __proto__: Trac.prototype,
88
89     get oldestRecordedRevisionNumber()
90     {
91         return 33018;
92     },
93
94     get latestRecordedRevisionNumber()
95     {
96         return 33022;
97     },
98
99     loadMoreHistoricalData: function()
100     {
101     },
102 };